First pass at using UBO

This commit is contained in:
jgk
2021-06-24 16:17:43 +02:00
parent d534f08064
commit 9c94ec93bd
6 changed files with 115 additions and 12 deletions
+6
View File
@@ -18,6 +18,11 @@ import Foreign
preloadRender :: IO RenderData
preloadRender = do
theUBO <- genObjectName
bindBuffer UniformBuffer $= Just theUBO
bufferData UniformBuffer $= (64, nullPtr, StaticDraw)
bindBufferBase IndexedUniformBuffer 0 $= Just theUBO
-- lighting shaders
lightingFloorShad <- makeShader "lighting/floor" [vert,geom,frag] [4] Points
pokeLightingFloorStrat
@@ -84,6 +89,7 @@ preloadRender = do
, _fboRenderbufferObject = fboRBO
, _fbo2 = framebuf2
, _fbo3 = framebuf3
, _matUBO = theUBO
}
cornerList :: [[Float]]