This commit is contained in:
2023-03-18 09:37:37 +00:00
parent 77c88f68a7
commit 2a9a38db8e
3 changed files with 51 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
module Dodge.WorldLoad where
import Shader.Bind
import Shader.Data
import Shader.Poke.Floor
import Data.Preload.Render
import Dodge.Data.CWorld
import Control.Monad
import Control.Lens
postWorldLoad :: RenderData -> CWorld -> IO CWorld
postWorldLoad rdata cw = do
nfloorvxs <- foldM (pokeTile (rdata ^. floorVBO . vboPtr))
0
(cw ^. cwTiles)
bufferPokedVBO (rdata ^. floorVBO) nfloorvxs
return $ cw & numberFloorVerxs .~ nfloorvxs