Change VBO to store vertex size in bytes
This commit is contained in:
+2
-2
@@ -21,7 +21,7 @@ bufferPokedVBO theVBO numVs =
|
||||
glNamedBufferSubData
|
||||
(_vboName theVBO)
|
||||
0
|
||||
(fromIntegral $ floatSize * numVs * _vboVertexSize theVBO)
|
||||
(fromIntegral $ numVs * _vboVertexBytes theVBO)
|
||||
(_vboPtr theVBO)
|
||||
|
||||
bufferEBO :: EBO -> Int -> IO ()
|
||||
@@ -37,7 +37,7 @@ bufferShaderLayers shads counts = MV.imapM_ f shads
|
||||
where
|
||||
f i shad = do
|
||||
let theVBO = snd shad
|
||||
stride = _vboVertexSize theVBO
|
||||
stride = _vboVertexBytes theVBO `div` floatSize
|
||||
VFSM.mapM_ (g stride theVBO) $ VFSM.enumFromStepN 0 1 6 -- [0..5]
|
||||
where
|
||||
g stride theVBO lay = do
|
||||
|
||||
Reference in New Issue
Block a user