diff options
author | David Thompson <dthompson2@worcester.edu> | 2014-06-28 16:17:00 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2014-08-25 19:33:07 -0400 |
commit | c1cf48cff05417f06df83c96e15b4b0019620b94 (patch) | |
tree | 84fe37ec98f97735cdf1b3e48a25fbf084fa07ec | |
parent | 5f9b31e2fa47e7a99216c0c8aa09a1d8d348a4f1 (diff) |
Add wrappers for OpenGL VAO functions.
* 2d/wrappers/gl.scm (glGenVertexArrays, glBindVertexArray): New
procedures.
(with-gl-client-state): New macro.
-rw-r--r-- | sly/wrappers/gl.scm | 24 |
1 files changed, 24 insertions, 0 deletions
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) |