Skip to content

Commit 0f1218d

Browse files
committed
Add an ElementArray buffer type.
1 parent a4ec901 commit 0f1218d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/GL/Buffer.hs

+3-1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ sizeOfElem b = S.sizeOf (elem b)
7272

7373
data Type
7474
= Array
75+
| ElementArray
7576
deriving (Eq, Ord, Show)
7677

7778
class KnownType (ty :: Type) where
@@ -82,7 +83,8 @@ instance KnownType 'Array where
8283

8384
instance GL.Enum Type where
8485
glEnum = \case
85-
Array -> GL_ARRAY_BUFFER
86+
Array -> GL_ARRAY_BUFFER
87+
ElementArray -> GL_ELEMENT_ARRAY_BUFFER
8688

8789

8890
data Update

0 commit comments

Comments
 (0)