bind buffers before reading from them
This commit is contained in:
parent
d0a9d342c7
commit
7142ce9b55
2 changed files with 2 additions and 0 deletions
|
@ -68,6 +68,7 @@ instance Buffer IndexBuffer where
|
|||
(fromIntegral currentBufSize `div`
|
||||
sizeOf (undefined :: StoreType IndexBuffer))
|
||||
$ \ (ptr :: Ptr (StoreType IndexBuffer)) -> do
|
||||
bind buf
|
||||
GL.bufferSubData
|
||||
(target buf)
|
||||
GL.ReadFromBuffer
|
||||
|
|
|
@ -98,6 +98,7 @@ instance Buffer VertexBuffer where
|
|||
(fromIntegral currentBufSize `div`
|
||||
sizeOf (undefined :: StoreType VertexBuffer))
|
||||
$ \ (ptr :: Ptr (StoreType VertexBuffer)) -> do
|
||||
bind buf
|
||||
GL.bufferSubData
|
||||
(target buf)
|
||||
GL.ReadFromBuffer
|
||||
|
|
Loading…
Reference in a new issue