Cleanup shader code

This commit is contained in:
2023-03-14 22:05:17 +00:00
parent b7d7bc2346
commit db0d24d044
4 changed files with 29 additions and 27 deletions
+2 -2
View File
@@ -91,10 +91,10 @@ doDrawing' win pdata u = do
uncurry (zipWithM_ bufferPokedVBO) $
unzip
[ (pdata ^. vboWalls, nWalls)
, (_vboShapes pdata, nShapeVs)
, (pdata ^. vboWindows, nWins)
, (snd $ _textureArrayShader pdata, nFls)
]
bufferPokedVBO (_vboShapes pdata) nShapeVs
glNamedBufferSubData
(_eboName $ _shapeEBO pdata)
0
@@ -136,7 +136,7 @@ doDrawing' win pdata u = do
renderLayer BottomLayer shadV layerCounts
--draw object shapes onto base buffer
let fs = _shapeShader pdata
glUseProgram (_shadName $ fs)
glUseProgram (_shadName fs)
glBindVertexArray $ fs ^. shadVAO . vaoName
glDrawElements
(marshalEPrimitiveMode $ _shadPrim' $ fs)