summaryrefslogtreecommitdiff
path: root/2d
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2014-04-21 22:23:33 -0400
committerDavid Thompson <dthompson2@worcester.edu>2014-04-21 22:23:33 -0400
commitb453e5141bfa9554f4f2ebaa52c62616c54fdedd (patch)
treef7d7cee6d4039fd4812f141bae4345addc36bea7 /2d
parent491f4465e9c5fbc63ad92b8a6904d3e3c611ade1 (diff)
Add bindings for OpenGL instanced rendering extension.
* 2d/wrappers/gl.scm (glDrawArraysInstanced): New procedure. (glVertexAttribDivisor): New procedure.
Diffstat (limited to '2d')
-rw-r--r--2d/wrappers/gl.scm24
1 files changed, 23 insertions, 1 deletions
diff --git a/2d/wrappers/gl.scm b/2d/wrappers/gl.scm
index e43ba8a..3ee84dd 100644
--- a/2d/wrappers/gl.scm
+++ b/2d/wrappers/gl.scm
@@ -23,7 +23,9 @@
;;; Code:
(define-module (2d wrappers gl)
- #:use-module ((gl low-level) #:renamer (symbol-prefix-proc '%)))
+ #:use-module ((gl low-level) #:renamer (symbol-prefix-proc '%))
+ #:use-module (gl runtime)
+ #:use-module (gl types))
;;;
;;; 3.8.1 Texture Image Specification
@@ -72,3 +74,23 @@
(%glBindTexture target 0)))
(export with-gl-bind-texture)
+
+;;;
+;;; Instancing extension
+;;;
+
+(define-gl-procedure (glDrawArraysInstanced (mode GLenum)
+ (first GLint)
+ (count GLsizei)
+ (primcount GLsizei)
+ -> GLboolean)
+ "Draw multiple instances of a set of arrays.")
+
+(define-gl-procedure (glVertexAttribDivisor (index GLuint)
+ (divisor GLuint)
+ -> void)
+ "Modify the rate at which generic vertex attributes advance during
+instanced rendering.")
+
+(export glDrawArraysInstanced
+ glVertexAttribDivisor)