Put config/targeting pictures in sensible places, tweak main loop

This commit is contained in:
2022-06-28 01:19:47 +01:00
parent 03b37c4e7b
commit f6d96ec92c
14 changed files with 148 additions and 154 deletions
+2 -7
View File
@@ -47,17 +47,15 @@ doDrawing pdata u = do
-- bind as much data into vbos as feasible at this point
-- count mutable vectors setup
layerCounts <- UMV.replicate (numLayers*6) 0
-- shapeCounts <- UMV.replicate 3 0
wlwiflCounts <- UMV.replicate 3 0
-- attempt to poke in parallel
let (ws,wp) = wallSPics <> worldSPic cfig w
(nShapeVs, nIndices, nSilIndices) <- MP.bindM3 (\ _ _ counts -> return counts)
( (nWalls, nWins , nFls),(nShapeVs, nIndices, nSilIndices) )
<- MP.bindM3 (\ _ wlwifl counts -> return (wlwifl,counts))
( pokeBindFoldableLayer shadV layerCounts wp)
( pokeWallsWindowsFloor
(shadVBOptr $ _wallTextureShader pdata)
(shadVBOptr $ _windowShader pdata)
(shadVBOptr $ _textureArrayShader pdata)
wlwiflCounts
wallPointsCol
windowPoints
(_floorTiles w)
@@ -68,9 +66,6 @@ doDrawing pdata u = do
(_eboPtr $ _silhouetteEBO pdata)
ws
)
nWalls <- UMV.read wlwiflCounts 0
nWins <- UMV.read wlwiflCounts 1
nFls <- UMV.read wlwiflCounts 2
-- bind wall points, silhouette data, surface geometry
uncurry bindShaderBuffers $ unzip
[ ( _wallTextureShader pdata, nWalls)