Data-ify creature drawing (partially)
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user