moved generation of GLMapState

GLMapState now get generated inside the renderer and takes the
map-data as argument

GLMapState got extended by (up to now) uninitialized and unused textures.
This commit is contained in:
Stefan Dresselhaus
2014-04-24 14:21:25 +02:00
parent ca831692d2
commit f76da4b5f6
3 changed files with 56 additions and 44 deletions

View File

@ -74,6 +74,26 @@ data KeyboardState = KeyboardState
{ _arrowsPressed :: !ArrowKeyState
}
-- | State in which all map-related Data is stored
--
-- The map itself is rendered with mapProgram and the shaders given here directly
-- This does not include any objects on the map - only the map itself
--
-- _mapTextures must contain the following Textures (in this ordering) after initialisation:
--
-- 1. Grass
--
-- 2. Sand
--
-- 3. Water
--
-- 4. Stone
--
-- 5. Snow
--
-- 6. Dirt (blended on grass)
data GLMapState = GLMapState
{ _shdrVertexIndex :: !GL.AttribLocation
, _shdrColorIndex :: !GL.AttribLocation
@ -88,8 +108,9 @@ data GLMapState = GLMapState
, _stateMap :: !GL.BufferObject
, _mapVert :: !GL.NumArrayIndices
, _mapProgram :: !GL.Program
, _mapTexture :: !TextureObject
, _renderedMapTexture :: !TextureObject --TODO: Probably move to UI?
, _overviewTexture :: !TextureObject
, _mapTextures :: ![TextureObject] --TODO: Fix size on list?
}
data GLHud = GLHud