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:
23
src/Types.hs
23
src/Types.hs
@ -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
|
||||
|
Reference in New Issue
Block a user