General cleanup
This commit is contained in:
+2
-2
@@ -29,13 +29,13 @@ bufferEBO :: UintBO -> Int -> IO ()
|
||||
bufferEBO x i =
|
||||
glNamedBufferSubData (x ^. uiboName) 0 (fromIntegral $ gluintSize * i) (x ^. uiboPtr)
|
||||
|
||||
bufferShaderLayers :: MV.MVector (PrimState IO) (Shader, VBO) -> UMV.MVector (PrimState IO) Int -> IO ()
|
||||
bufferShaderLayers
|
||||
:: MV.MVector (PrimState IO) (Shader, VBO) -> UMV.MVector (PrimState IO) Int -> IO ()
|
||||
bufferShaderLayers shads counts = MV.imapM_ f shads
|
||||
where
|
||||
f i shad = do
|
||||
let theVBO = snd shad
|
||||
stride = _vboVertexBytes theVBO `div` floatSize
|
||||
--VFSM.mapM_ (g stride theVBO) $ VFSM.enumFromStepN 0 1 6 -- [0..5]
|
||||
VFSM.mapM_ (g stride theVBO) $ VFSM.enumFromStepN 0 1 numLayers -- [0..5]
|
||||
where
|
||||
g stride theVBO lay = do
|
||||
|
||||
+9
-6
@@ -237,15 +237,13 @@ pokeBox ::
|
||||
IO (Int, Int, Int)
|
||||
{-# INLINE pokeBox #-}
|
||||
pokeBox sfid col size ptr iptr ieptr (nv, nsi, nei) svs = do
|
||||
nv' <- VFSM.foldM' (pokeBoxSurface xdata col ptr svsv) nv $ VFSM.fromList $ memoBoxSurfaces V.! size
|
||||
-- nv' <- VFSM.foldM' (pokeBoxSurface xdata col ptr svsv) nv $ VFSM.fromList $ boxSurfaces size
|
||||
nv' <- VFSM.foldM' (pokeBoxSurface xdata col ptr svsv) nv
|
||||
$ VFSM.fromList $ memoBoxSurfaces V.! size
|
||||
nsi' <-
|
||||
UV.foldM'
|
||||
(pokeIndex nv iptr)
|
||||
nsi
|
||||
(memoFlatIndices V.! (size -3))
|
||||
-- VFSM.foldM' (pokeIndex nv iptr) nsi
|
||||
-- (VFSM.fromList . concatMap polyToTris $ boxSurfacesIndices size)
|
||||
nei' <-
|
||||
if sfid
|
||||
then return nei
|
||||
@@ -476,7 +474,11 @@ pokeLayVerxs ::
|
||||
IO ()
|
||||
pokeLayVerxs vbos counts = VFSM.mapM_ (pokeLayVerx vbos counts) . VFSM.fromList
|
||||
|
||||
pokeLayVerx :: MV.MVector (PrimState IO) (Shader, VBO) -> UMV.MVector (PrimState IO) Int -> Verx -> IO ()
|
||||
pokeLayVerx
|
||||
:: MV.MVector (PrimState IO) (Shader, VBO)
|
||||
-> UMV.MVector (PrimState IO) Int
|
||||
-> Verx
|
||||
-> IO ()
|
||||
{-# INLINE pokeLayVerx #-}
|
||||
pokeLayVerx vbos counts vx = do
|
||||
theOff <- UMV.unsafeRead counts vecPos
|
||||
@@ -498,7 +500,8 @@ pokeLayVerx vbos counts vx = do
|
||||
pokeStride :: ShadNum -> Int
|
||||
{-# INLINE pokeStride #-}
|
||||
pokeStride PolyShad = 7
|
||||
pokeStride TextShad = 11
|
||||
--pokeStride TextShad = 11
|
||||
pokeStride TextShad = 10
|
||||
pokeStride ArcShad = 10
|
||||
pokeStride EllShad = 7
|
||||
|
||||
|
||||
Reference in New Issue
Block a user