@@ -27,8 +27,19 @@ module Graphics.Rendering.OpenGL.GL.VertexArrays (
27
27
28
28
-- * Dereferencing and Rendering
29
29
ArrayIndex , NumArrayIndices , NumIndexBlocks ,
30
- arrayElement , drawArrays , multiDrawArrays , drawElements , multiDrawElements ,
31
- drawRangeElements , maxElementsVertices , maxElementsIndices , lockArrays ,
30
+ arrayElement ,
31
+
32
+ drawArrays , drawArraysInstancedBaseInstance , drawArraysInstanced ,
33
+ multiDrawArrays ,
34
+
35
+ drawElements , drawElementsInstancedBaseInstance , drawElementsInstanced ,
36
+ multiDrawElements , drawRangeElements ,
37
+
38
+ drawElementsBaseVertex , drawRangeElementsBaseVertex ,
39
+ drawElementsInstancedBaseVertex , drawElementsInstancedBaseVertexBaseInstance ,
40
+ multiDrawElementsBaseVertex ,
41
+
42
+ maxElementsVertices , maxElementsIndices , lockArrays ,
32
43
primitiveRestartIndex , primitiveRestartIndexNV ,
33
44
34
45
-- * Generic Vertex Attribute Arrays
@@ -330,6 +341,12 @@ arrayElement = glArrayElement
330
341
drawArrays :: PrimitiveMode -> ArrayIndex -> NumArrayIndices -> IO ()
331
342
drawArrays = glDrawArrays . marshalPrimitiveMode
332
343
344
+ drawArraysInstancedBaseInstance :: PrimitiveMode -> ArrayIndex -> NumArrayIndices -> GLsizei -> GLuint -> IO () -- TODO: type
345
+ drawArraysInstancedBaseInstance = glDrawArraysInstancedBaseInstance . marshalPrimitiveMode
346
+
347
+ drawArraysInstanced :: PrimitiveMode -> ArrayIndex -> NumArrayIndices -> GLsizei -> IO () -- TODO: type
348
+ drawArraysInstanced = glDrawArraysInstanced . marshalPrimitiveMode
349
+
333
350
multiDrawArrays ::
334
351
PrimitiveMode -> Ptr ArrayIndex -> Ptr NumArrayIndices -> NumIndexBlocks
335
352
-> IO ()
@@ -338,6 +355,12 @@ multiDrawArrays = glMultiDrawArrays . marshalPrimitiveMode
338
355
drawElements :: PrimitiveMode -> NumArrayIndices -> DataType -> Ptr a -> IO ()
339
356
drawElements m c = glDrawElements (marshalPrimitiveMode m) c . marshalDataType
340
357
358
+ drawElementsInstancedBaseInstance :: PrimitiveMode -> NumArrayIndices -> DataType -> Ptr a -> GLsizei -> GLuint -> IO () -- TODO: type
359
+ drawElementsInstancedBaseInstance m c = glDrawElementsInstancedBaseInstance (marshalPrimitiveMode m) c . marshalDataType
360
+
361
+ drawElementsInstanced :: PrimitiveMode -> NumArrayIndices -> DataType -> Ptr a -> GLsizei -> IO () -- TODO: type
362
+ drawElementsInstanced m c = glDrawElementsInstanced (marshalPrimitiveMode m) c . marshalDataType
363
+
341
364
multiDrawElements ::
342
365
PrimitiveMode -> Ptr NumArrayIndices -> DataType -> Ptr (Ptr a )
343
366
-> NumIndexBlocks -> IO ()
@@ -351,6 +374,21 @@ drawRangeElements m (s, e) c =
351
374
glDrawRangeElements (marshalPrimitiveMode m) (fromIntegral s)
352
375
(fromIntegral e) c . marshalDataType
353
376
377
+ drawElementsBaseVertex :: PrimitiveMode -> NumArrayIndices -> DataType -> Ptr a -> GLint -> IO () -- TODO: type
378
+ drawElementsBaseVertex m c = glDrawElementsBaseVertex (marshalPrimitiveMode m) c . marshalDataType
379
+
380
+ drawRangeElementsBaseVertex :: PrimitiveMode -> (ArrayIndex , ArrayIndex ) -> NumArrayIndices -> DataType -> Ptr a -> GLint -> IO () -- TODO: type
381
+ drawRangeElementsBaseVertex m (s, e) c = glDrawRangeElementsBaseVertex (marshalPrimitiveMode m) (fromIntegral s) (fromIntegral e) c . marshalDataType
382
+
383
+ drawElementsInstancedBaseVertex :: PrimitiveMode -> NumArrayIndices -> DataType -> Ptr a -> GLsizei -> GLint -> IO () -- TODO: type
384
+ drawElementsInstancedBaseVertex m c = glDrawElementsInstancedBaseVertex (marshalPrimitiveMode m) c . marshalDataType
385
+
386
+ drawElementsInstancedBaseVertexBaseInstance :: PrimitiveMode -> NumArrayIndices -> DataType -> Ptr a -> GLsizei -> GLint -> GLuint -> IO () -- TODO: type
387
+ drawElementsInstancedBaseVertexBaseInstance m c = glDrawElementsInstancedBaseVertexBaseInstance (marshalPrimitiveMode m) c . marshalDataType
388
+
389
+ multiDrawElementsBaseVertex :: PrimitiveMode -> Ptr NumArrayIndices -> DataType -> Ptr (Ptr a ) -> GLsizei -> Ptr GLint -> IO () -- TODO: type
390
+ multiDrawElementsBaseVertex m c = glMultiDrawElementsBaseVertex (marshalPrimitiveMode m) c . marshalDataType
391
+
354
392
maxElementsVertices :: GettableStateVar NumArrayIndices
355
393
maxElementsVertices = makeGettableStateVar (getSizei1 id GetMaxElementsVertices )
356
394
0 commit comments