Data-ify creature drawing (partially)

This commit is contained in:
2022-07-10 23:24:25 +01:00
parent 646942d20c
commit 75cd15c240
20 changed files with 52 additions and 76 deletions
+2 -2
View File
@@ -118,7 +118,7 @@ pokeShapeObj
-> (Int,Int,Int)
-> ShapeObj
-> IO (Int,Int,Int)
--{-# INLINE pokeShapeObj #-}
{-# INLINE pokeShapeObj #-}
pokeShapeObj ptr iptr ieptr counts (ShapeObj shtype shVerts) = case shtype of
TopPrism size -> pokeTopPrism (size - 2) ptr iptr ieptr counts (S.each shVerts)
@@ -127,7 +127,7 @@ pokeTopPrism :: Int -> Ptr Float -> Ptr GLushort
-> (Int,Int,Int)
-> Stream (Of ShapeV) IO ()
-> IO (Int,Int,Int)
--{-# INLINE pokeTopPrism #-}
{-# INLINE pokeTopPrism #-}
pokeTopPrism size ptr iptr ieptr (nv,nshapeindices,nedgeindices) svs = do
nv' <- S.foldM_ (pokeJustV ptr) (return nv) return svs
nshapeindices' <- UV.foldM' (pokeTopPrismIndex nv iptr) nshapeindices