Change bufferData to bufferSubData

This commit is contained in:
2021-06-24 18:19:03 +02:00
parent 97598bc171
commit d4795749e3
3 changed files with 19 additions and 7 deletions
+6
View File
@@ -68,6 +68,12 @@ setupVBO sizes = do
forM_ (zip3 [0..] sizes offs) $ \(loc,siz,off) -> do
setupVertexAttribPointer loc siz strd off
thePtr <- mallocArray (strd * numDrawableElements)
-- Allocate space
bufferData ArrayBuffer $=
(fromIntegral $ floatSize * numDrawableElements * strd
, nullPtr
, DynamicDraw
)
return $ VBO
{ _vbo = vboName
, _vboPointer = thePtr