Refactor shaders, vbos and vaos

This commit is contained in:
2023-03-14 20:24:08 +00:00
parent 378af69ca5
commit ed0da4bf1d
11 changed files with 147 additions and 101 deletions
+3 -3
View File
@@ -26,7 +26,7 @@ drawShaderLay l countsVector shadIn fs = do
i <- UMV.read countsVector shadIn
--currentProgram $= Just (_shadProg' fs)
glUseProgram (_shadName $ fst fs)
glBindVertexArray $ fs ^. _1 . shadVAO' . vaoName
glBindVertexArray $ fs ^. _1 . shadVAO . vaoName
--bindVertexArrayObject $= Just (_vaoName $ _shadVAO' fs)
case _shadTex' $ fst fs of
Just ShaderTexture{_textureObject = txo} --, _textureTarget = tt}
@@ -44,7 +44,7 @@ drawShader :: FullShader -> Int -> IO ()
drawShader fs i = do
--currentProgram $= Just (_shadProg fs)
glUseProgram (_shadName fs)
glBindVertexArray $ fs ^. shadVAO' . vaoName
glBindVertexArray $ fs ^. shadVAO . vaoName
--bindVertexArrayObject $= Just (_vaoName $ _shadVAO' fs)
case _shadTex' fs of
Just ShaderTexture{_textureObject = txo
@@ -67,7 +67,7 @@ pokeBindFoldable
-> IO ()
pokeBindFoldable shadV counts m = do
pokeVerxs shadV counts m
bindShader shadV counts
bufferShaderVector shadV counts
pokeBindFoldableLayer
:: MV.MVector (PrimState IO) (FullShader,VBO)