Unify world shape and picture into spic

This commit is contained in:
2021-11-01 02:00:12 +00:00
parent 86fdfd260e
commit da346bc3a0
9 changed files with 266 additions and 158 deletions
+6 -2
View File
@@ -9,6 +9,7 @@ import Dodge.Config.Data
import Dodge.Base.Window
import Dodge.Render.Picture
import Dodge.Render.Shape
import Dodge.Render.ShapePicture
import Geometry
import Render
import Data.Preload.Render
@@ -49,8 +50,10 @@ doDrawing pdata w = do
shapeCounts <- UMV.replicate 3 (0 :: Int)
wlwiflCounts <- UMV.replicate 3 (0 :: Int)
-- attempt to poke in parallel
let (ws,wp) = worldSPic w
MP.bindM3 (\ _ _ _ -> return ())
( pokeBindFoldableLayer shadV layerCounts $ worldPictures w )
--( pokeBindFoldableLayer shadV layerCounts $ worldPictures w )
( pokeBindFoldableLayer shadV layerCounts wp)
( pokeWallsWindowsFloor
(shadVBOptr $ _wallTextureShader pdata)
(shadVBOptr $ _windowShader pdata)
@@ -65,7 +68,8 @@ doDrawing pdata w = do
(_eboPtr $ _shapeEBO pdata)
(_eboPtr $ _silhouetteEBO pdata)
shapeCounts
$ worldShape w
-- $ worldShape w
ws
)
nShapeVs <- UMV.read shapeCounts 0
nIndices <- UMV.read shapeCounts 1