diff options
author | Jeanne-Kamikaze <jeannekamikaze@gmail.com> | 2013-03-14 13:25:57 +0100 |
---|---|---|
committer | Jeanne-Kamikaze <jeannekamikaze@gmail.com> | 2013-03-14 13:25:57 +0100 |
commit | 74a2ce0d65b8864186abebab07908fd1e50ab910 (patch) | |
tree | b0f2df4bef983d4f114e3541458689c09d8f6512 | |
parent | c38a05517d24309ac755c7c0c3dae3878a076a78 (diff) |
Fixed bufferData
-rw-r--r-- | Spear/GL.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Spear/GL.hs b/Spear/GL.hs index af96da4..814099f 100644 --- a/Spear/GL.hs +++ b/Spear/GL.hs | |||
@@ -549,7 +549,7 @@ class Storable a => BufferData a where | |||
549 | -- | Set the buffer's data. | 549 | -- | Set the buffer's data. |
550 | bufferData :: TargetBuffer -> [a] -> BufferUsage -> IO () | 550 | bufferData :: TargetBuffer -> [a] -> BufferUsage -> IO () |
551 | bufferData tgt vals usage = | 551 | bufferData tgt vals usage = |
552 | let n = sizeOf (undefined :: Word8) * length vals | 552 | let n = sizeOf (head vals) * length vals |
553 | in withArray vals $ \ptr -> bufferData' tgt n ptr usage | 553 | in withArray vals $ \ptr -> bufferData' tgt n ptr usage |
554 | 554 | ||
555 | instance BufferData Word8 | 555 | instance BufferData Word8 |