From c1cf48cff05417f06df83c96e15b4b0019620b94 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sat, 28 Jun 2014 16:17:00 -0400 Subject: Add wrappers for OpenGL VAO functions. * 2d/wrappers/gl.scm (glGenVertexArrays, glBindVertexArray): New procedures. (with-gl-client-state): New macro. --- sly/wrappers/gl.scm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'sly/wrappers') diff --git a/sly/wrappers/gl.scm b/sly/wrappers/gl.scm index 4a9b2fa..c6b84a4 100644 --- a/sly/wrappers/gl.scm +++ b/sly/wrappers/gl.scm @@ -94,3 +94,27 @@ instanced rendering.") (export glDrawArraysInstanced glVertexAttribDivisor) + +;;; +;;; VAOs +;;; + +(define-gl-procedure (glGenVertexArrays (n GLsizei) + (arrays GLuint-*) + -> void) + "Generate N vertex arrays.") + +(define-gl-procedure (glBindVertexArray (array GLuint) + -> void) + "Bind vertex array object ARRAY.") + +(export glGenVertexArrays + glBindVertexArray) + +(define-syntax-rule (with-gl-client-state state body ...) + (begin + (gl-enable-client-state state) + body ... + (gl-disable-client-state state))) + +(export with-gl-client-state) -- cgit v1.2.3