From b453e5141bfa9554f4f2ebaa52c62616c54fdedd Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 21 Apr 2014 22:23:33 -0400 Subject: Add bindings for OpenGL instanced rendering extension. * 2d/wrappers/gl.scm (glDrawArraysInstanced): New procedure. (glVertexAttribDivisor): New procedure. --- 2d/wrappers/gl.scm | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to '2d') 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) -- cgit v1.2.3