Implement static VBO/VAO
This commit is contained in:
@@ -124,14 +124,15 @@ preloadRender = do
|
||||
--initTexture2DArray 50 "data/texture/charMapVertBig.png" 2 32 64 95 GL_LINEAR_MIPMAP_NEAREST GL_LINEAR
|
||||
|
||||
putStrLn "Setup full screen shaders"
|
||||
screentexturevbo <- mglCreate glCreateBuffers
|
||||
withArray (concat cornerList) $ \ptr ->
|
||||
glNamedBufferStorage
|
||||
screentexturevbo
|
||||
(fromIntegral $ floatSize * length (concat cornerList))
|
||||
ptr
|
||||
0
|
||||
screentexturevao <- setupVAOvbo (toFloatVAs [2, 2]) 4 screentexturevbo
|
||||
-- screentexturevbo <- mglCreate glCreateBuffers
|
||||
-- withArray (concat cornerList) $ \ptr ->
|
||||
-- glNamedBufferStorage
|
||||
-- screentexturevbo
|
||||
-- (fromIntegral $ floatSize * length (concat cornerList))
|
||||
-- ptr
|
||||
-- 0
|
||||
-- screentexturevao <- setupVAOvbo (toFloatVAs [2, 2]) 4 screentexturevbo
|
||||
(_,screentexturevao) <- setupStaticVBO (toFloatVAs [2,2]) (concat cornerList)
|
||||
alphadivideshader <- makeShaderUsingVAO "texture2D/alphaDivide" [vert, frag] pmTriangleStrip screentexturevao
|
||||
fsShad <- makeShaderUsingVAO "texture/simple" [vert, frag] pmTriangleStrip screentexturevao
|
||||
bloomBlurShad <- makeShaderUsingVAO "texture/bloomBlur" [vert, frag] pmTriangleStrip screentexturevao
|
||||
|
||||
Reference in New Issue
Block a user