Change VBO to store vertex size in bytes

This commit is contained in:
2023-04-12 23:47:52 +01:00
parent 589f663b65
commit 9bb1a22ea5
3 changed files with 30 additions and 8 deletions
+2 -2
View File
@@ -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