Buggy (but fastish) merge of shadows into shapes

This commit is contained in:
2021-09-21 10:09:40 +01:00
parent e98ada22fd
commit 8854b195cc
3 changed files with 54 additions and 45 deletions
+2 -3
View File
@@ -56,16 +56,15 @@ doDrawing pdata w = do
-- bind as much data into vbos as feasible at this point
-- poke wall points and colors
nWalls <- poke224s (shadVBOptr $ _wallTextureShader pdata) wallPointsCol
(numShapeVs,nSils,nIndices,nSilIndices) <- pokeShape
(numShapeVs,nIndices,nSilIndices) <- pokeShape
(_vboPtr $ _vaoVBO $ _shadVAO $ _shapeShader pdata)
(shadVBOptr $ _lightingLineShadowShader pdata)
-- (shadVBOptr $ _lightingLineShadowShader pdata)
(_eboPtr $ _shapeEBO pdata)
(_eboPtr $ _silhouetteEBO pdata)
$ worldShape w
-- bind wall points, silhouette data, surface geometry
uncurry bindShaderBuffers $ unzip
[ ( _wallTextureShader pdata, nWalls)
, (_lightingLineShadowShader pdata, nSils)
, (_shapeShader pdata, numShapeVs)
]
bindBuffer ElementArrayBuffer $= Just (_ebo $ _shapeEBO pdata)