Cleanup createLightmap

This commit is contained in:
2021-09-01 01:13:10 +01:00
parent 4cd8b5aa1c
commit db5c27a3ed
3 changed files with 51 additions and 125 deletions
+27
View File
@@ -88,6 +88,33 @@ pokeArrayOff :: Ptr Float -> Int -> [Float] -> IO ()
{-# INLINE pokeArrayOff #-}
pokeArrayOff ptr i = pokeArray (plusPtr ptr (floatSize * i))
--pokeTwoOff
-- :: Ptr Float
-- -> Int
-- -> (Float,Float)
-- -> IO ()
--{-# INLINE pokeTwoOff #-}
--pokeTwoOff ptr n (x,y) = do
-- pokeElemOff ptr (2*n+0) x
-- pokeElemOff ptr (2*n+1) y
--pokeThreeOff
-- :: Ptr Float
-- -> Int
-- -> (Float,Float,Float)
-- -> IO ()
--{-# INLINE pokeThreeOff #-}
--pokeThreeOff ptr n (x,y,z) = do
-- pokeElemOff ptr (3*n+0) x
-- pokeElemOff ptr (3*n+1) y
-- pokeElemOff ptr (3*n+2) z
--pokeFourOff :: Ptr Float -> Int -> (Float,Float,Float,Float) -> IO ()
--{-# INLINE pokeFourOff #-}
--pokeFourOff ptr n (x,y,z,w) = do
-- pokeElemOff ptr (4*n+0) x
-- pokeElemOff ptr (4*n+1) y
-- pokeElemOff ptr (4*n+2) z
-- pokeElemOff ptr (4*n+3) w
pokePoint33s :: Ptr Float -> [(Point3,Point3)] -> IO Int
pokePoint33s ptr vals0 = go vals0 0
where