Make pictures use Streaming

This commit is contained in:
2022-07-03 23:55:21 +01:00
parent f9a904d52b
commit 7fa391eb6c
8 changed files with 54 additions and 46 deletions
+2 -3
View File
@@ -30,7 +30,7 @@ pokeVerxs
-> UMV.MVector (PrimState IO) Int
-> Picture
-> IO ()
pokeVerxs vbos count = VS.mapM_ (pokeVerx vbos count) . VS.fromList
pokeVerxs vbos count = S.mapM_ (pokeVerx vbos count)
pokeVerx :: MV.MVector (PrimState IO) FullShader -> UMV.MVector (PrimState IO) Int -> Verx -> IO ()
pokeVerx vbos offsets Verx{_vxPos=thePos,_vxCol=theCol,_vxExt=ext,_vxShadNum=theShadNum} = do
@@ -85,7 +85,6 @@ pokeShape :: Ptr Float -> Ptr GLushort -> Ptr GLushort
-> Stream (Of ShapeObj) IO ()
-> IO (Int,Int,Int)
pokeShape ptr iptr ieptr = S.foldM_ (pokeShapeObj ptr iptr ieptr) (return (0,0,0)) return
pokeShapeObj
:: Ptr Float
@@ -187,7 +186,7 @@ pokeLayVerxs
-> UMV.MVector (PrimState IO) Int
-> Picture
-> IO ()
pokeLayVerxs vbos counts = VS.mapM_ (pokeLayVerx vbos counts) . VS.fromList
pokeLayVerxs vbos counts = S.mapM_ (pokeLayVerx vbos counts)
pokeLayVerx :: MV.MVector (PrimState IO) FullShader -> UMV.MVector (PrimState IO) Int -> Verx -> IO ()
--{-# INLINE pokeLayVerx #-}