Change bufferData to bufferSubData
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user