Textures work now.

Scene gets rendered and alpha-overlayed with HUD-Texture.

fixes #472 @2h
This commit is contained in:
Stefan Dresselhaus
2014-04-05 15:53:49 +02:00
parent 39341bf0f9
commit 189f9f84fa
4 changed files with 117 additions and 19 deletions

View File

@ -87,11 +87,13 @@ data GLMapState = GLMapState
, _stateMap :: !GL.BufferObject
, _mapVert :: !GL.NumArrayIndices
, _mapProgram :: !GL.Program
, _mapTexture :: !TextureObject
}
data GLHud = GLHud
{ _hudTexture :: !TextureObject -- ^ Texture itself
, _hudTexIndex :: !GL.UniformLocation -- ^ Position of Texture in Shader
{ _hudTexture :: !TextureObject -- ^ HUD-Texture itself
, _hudTexIndex :: !GL.UniformLocation -- ^ Position of Overlay-Texture in Shader
, _hudBackIndex :: !GL.UniformLocation -- ^ Position of Background-Texture in Shader
, _hudVertexIndex :: !GL.AttribLocation -- ^ Position of Vertices in Shader
, _hudVert :: !GL.NumArrayIndices -- ^ Number of Vertices to draw
, _hudVBO :: !GL.BufferObject -- ^ Vertex-Buffer-Object
@ -102,6 +104,8 @@ data GLHud = GLHud
data GLState = GLState
{ _glMap :: !GLMapState
, _glHud :: !GLHud
, _glRenderbuffer :: !GL.RenderbufferObject
, _glFramebuffer :: !GL.FramebufferObject
}
data UIState = UIState