Move towards uploading certain vbos less than once per frame (floor)

This commit is contained in:
2023-03-17 17:47:12 +00:00
parent 850fdf1783
commit d8fb7a1f99
7 changed files with 29 additions and 8 deletions
+6
View File
@@ -5,6 +5,7 @@ module Shader.Poke (
pokeShape,
pokeWallsWindowsFloor,
memoTopPrismEdgeIndices,
pokeFloors
) where
import Control.Monad.Primitive
@@ -54,6 +55,11 @@ pokeWallsWindowsFloor wlptr wiptr flptr wls wis fls = do
flcounts <- VFSM.foldlM' (pokeF flptr) 0 (VFSM.fromList fls)
return (wlcounts1, wlcounts2, flcounts)
pokeFloors :: Ptr Float ->
[(Point3, Point3)] ->
IO Int
pokeFloors flptr fls = VFSM.foldlM' (pokeF flptr) 0 (VFSM.fromList fls)
pokeF :: Ptr Float -> Int -> (Point3, Point3) -> IO Int
pokeF ptr i' (V3 a b c, V3 d e f) = do
let i = i' * 6