Replace explicit matrix uniforms with single ubo
This commit is contained in:
@@ -56,15 +56,12 @@ preloadRender = do
|
||||
-- textured wallShader
|
||||
wlTexture <- makeShader "wall/texture" [vert,geom,frag] [4,4] Points pokeWPColStrat
|
||||
>>= addTexture "data/texture/grayscaleDirt.png"
|
||||
|
||||
---- texture shader
|
||||
textShad <- makeShader "texture/simpleWorld" [vert,frag] [3,2] Triangles poke32
|
||||
>>= addTexture "data/texture/ayene_wooden_floor.png"
|
||||
|
||||
---- texture array shader
|
||||
textArrayShad <- makeShader "texture/array" [vert,frag] [3,3] Triangles poke33
|
||||
>>= addTextureArray "data/texture/ayene_wooden_floor.png"
|
||||
|
||||
-- framebuffer for lighting
|
||||
(fbo,fboTO,fboRBO) <- setupFramebufferWithStencil
|
||||
framebuf2 <- setupFramebufferWithStencil
|
||||
@@ -91,7 +88,6 @@ preloadRender = do
|
||||
, _fbo3 = framebuf3
|
||||
, _matUBO = theUBO
|
||||
}
|
||||
|
||||
cornerList :: [[Float]]
|
||||
cornerList =
|
||||
[[-1, 1,0,1]
|
||||
@@ -99,17 +95,6 @@ cornerList =
|
||||
,[-1,-1,0,0]
|
||||
,[ 1,-1,1,0]
|
||||
]
|
||||
-- potential drawing setup
|
||||
---- swapInterval $= ImmediateUpdates
|
||||
-- GL.blend $= GL.Enabled
|
||||
---- GL.depthMask $= GL.Enabled
|
||||
-- GL.blendEquation $= GL.FuncAdd
|
||||
-- GL.blendFunc $= (GL.SrcAlpha,GL.OneMinusSrcAlpha)
|
||||
-- GL.clearColor $= GL.Color4 0 0.5 0 1
|
||||
-- GL.clearDepth $= (200)
|
||||
-- swapInterval $= ImmediateUpdates
|
||||
-- GL.lineSmooth $= GL.Enabled
|
||||
|
||||
--------------------end preloadRender
|
||||
|
||||
setupFramebufferWithStencil :: IO (FramebufferObject, TextureObject,RenderbufferObject)
|
||||
|
||||
Reference in New Issue
Block a user