Use mutable vectors to store shape vertex counts
This commit is contained in:
+6
-1
@@ -45,8 +45,9 @@ doDrawing pdata w = do
|
||||
-- bind as much data into vbos as feasible at this point
|
||||
-- pictures setup
|
||||
layerCounts <- UMV.replicate (6*6) 0
|
||||
shapeCounts <- UMV.replicate 3 (0 :: Int)
|
||||
-- attempt to do this poking in parallel
|
||||
(nWalls,(nShapeVs,nIndices,nSilIndices)) <- MP.bindM3 (\ _ a b -> return (a,b))
|
||||
nWalls <- MP.bindM3 (\ _ a _ -> return a)
|
||||
-- pictures poking
|
||||
( pokeBindFoldableLayer shadV layerCounts $ worldPictures w )
|
||||
-- poke wall points and colors
|
||||
@@ -55,8 +56,12 @@ doDrawing pdata w = do
|
||||
(_vboPtr $ _vaoVBO $ _shadVAO $ _shapeShader pdata)
|
||||
(_eboPtr $ _shapeEBO pdata)
|
||||
(_eboPtr $ _silhouetteEBO pdata)
|
||||
shapeCounts
|
||||
$ worldShape w
|
||||
)
|
||||
nShapeVs <- UMV.read shapeCounts 0
|
||||
nIndices <- UMV.read shapeCounts 1
|
||||
nSilIndices <- UMV.read shapeCounts 2
|
||||
-- bind wall points, silhouette data, surface geometry
|
||||
uncurry bindShaderBuffers $ unzip
|
||||
[ ( _wallTextureShader pdata, nWalls)
|
||||
|
||||
Reference in New Issue
Block a user