summaryrefslogtreecommitdiff
path: root/sly/wrappers
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2014-11-30 13:24:50 -0500
committerDavid Thompson <dthompson2@worcester.edu>2014-11-30 13:29:40 -0500
commitb464597069999b138bcb1f7e1de14c7036ebb40c (patch)
tree01cfe6f2fbae6fe1206142a4aa0c202e0d738d02 /sly/wrappers
parent22070a5551a55a898f4ec9a9427430e491490799 (diff)
render: mesh: Add a finalizer to reclaim memory used by OpenGL.
* sly/render/mesh.scm (<mesh>) [mesh-vbos]: New field. (mesh-guardian): New guardian. (make-mesh): Add new meshes to guardian. * sly/wrappers/gl.scm (glDeleteVertexArrays): New procedure.
Diffstat (limited to 'sly/wrappers')
-rw-r--r--sly/wrappers/gl.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/sly/wrappers/gl.scm b/sly/wrappers/gl.scm
index 2d251dc..25d6dd4 100644
--- a/sly/wrappers/gl.scm
+++ b/sly/wrappers/gl.scm
@@ -127,11 +127,17 @@ instanced rendering.")
-> void)
"Generate N vertex arrays.")
+(define-gl-procedure (glDeleteVertexArrays (n GLsizei)
+ (arrays GLuint-*)
+ -> void)
+ "Delete vertex array objects.")
+
(define-gl-procedure (glBindVertexArray (array GLuint)
-> void)
"Bind vertex array object ARRAY.")
(export glGenVertexArrays
+ glDeleteVertexArrays
glBindVertexArray)
(define-syntax-rule (with-gl-client-state state body ...)