Move towards uploading certain vbos less than once per frame (floor)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user