From 5536cd71f991e2ca834b7d3affcd4acdd42675af Mon Sep 17 00:00:00 2001 From: William Robinson Date: Sat, 20 Oct 2007 11:29:57 +0100 Subject: [PATCH] Export fix and extra convenience macro. --- lib/opengl-convenience.lisp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/opengl-convenience.lisp b/lib/opengl-convenience.lisp index a2d383f..8e95bfb 100644 --- a/lib/opengl-convenience.lisp +++ b/lib/opengl-convenience.lisp @@ -59,4 +59,11 @@ (unwind-protect (progn ,@forms) (gl:end-query)))) -(export '(with-new-list with-push-name with-begin with-push-attrib with-push-matrix with-setup-projection with-push-client-attrib with-begin)) \ No newline at end of file +(defmacro with-map-buffer ((target access) &body forms) + (let ((ntarget (gensym "TARGET-"))) + `(let ((,ntarget ,target)) + (gl:map-buffer ,ntarget ,access) + (unwind-protect (progn ,@forms) + (gl:unmap-buffer ,ntarget))))) + +(export '(with-new-list with-push-name with-begin with-push-attrib with-push-matrix with-setup-projection with-push-client-attrib with-begin-query with-map-buffer)) \ No newline at end of file -- 2.11.4.GIT