Broken binding of central picture in one pass
This commit is contained in:
@@ -19,6 +19,9 @@ import Graphics.GL.Core43
|
||||
--import Control.Monad
|
||||
import Foreign
|
||||
|
||||
numDrawableWalls :: Int
|
||||
numDrawableWalls = 5000
|
||||
|
||||
preloadRender :: IO RenderData
|
||||
preloadRender = do
|
||||
-- set up uniform buffer object
|
||||
@@ -28,10 +31,10 @@ preloadRender = do
|
||||
bindBufferBase IndexedUniformBuffer 0 $= Just theUBO
|
||||
-- setup wall points VBO, VAOs and shaders
|
||||
wpVBOname <- genObjectName
|
||||
wpVBOptr <- mallocArray (8 * numDrawableElements)
|
||||
wpVBOptr <- mallocArray (8 * numDrawableWalls)
|
||||
bindBuffer ArrayBuffer $= Just wpVBOname
|
||||
bufferData ArrayBuffer $=
|
||||
(fromIntegral $ floatSize * numDrawableElements * 8
|
||||
(fromIntegral $ floatSize * numDrawableWalls * 8
|
||||
, nullPtr
|
||||
, DynamicDraw
|
||||
)
|
||||
@@ -69,11 +72,11 @@ preloadRender = do
|
||||
-- this should really be a 2d texture array
|
||||
basicTweakZShad <- makeShader "twoD/basicTweakZ" [vert,frag] [4,4] ETriangles pokeTriTweakZ
|
||||
-- fullscreen shaders
|
||||
fullscreenAlphaHalveShad <- makeShader "fullscreen/alphaHalve" [vert,frag] [2] ETriangleStrip $
|
||||
fullscreenAlphaHalveShad <- makeShaderSized "fullscreen/alphaHalve" [vert,frag] [2] 4 ETriangleStrip $
|
||||
const cornerListNoCoord
|
||||
pokeArray (_vboPointer $ _vaoVBO $ _shaderVAO fullscreenAlphaHalveShad) $ concat cornerListNoCoord
|
||||
-- texture shaders, no textures attached
|
||||
fsShad <- makeShader "texture/simple" [vert,frag] [2,2] ETriangleStrip $ const cornerList
|
||||
fsShad <- makeShaderSized "texture/simple" [vert,frag] [2,2] 4 ETriangleStrip $ const cornerList
|
||||
-- note we directly poke the shader vertex data here
|
||||
pokeArray (_vboPointer $ _vaoVBO $ _shaderVAO fsShad) $ concat cornerList
|
||||
bloomBlurShad <- makeShaderUsingShaderVAO "texture/bloomBlur" [vert,frag] ETriangleStrip fsShad
|
||||
|
||||
Reference in New Issue
Block a user