From: jsancho Date: Thu, 10 Sep 2009 17:06:39 +0000 (+0000) Subject: (no commit message) X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=e1ff0e053ac905d71ed73cc7b0cefae3120cb0d1;p=gacela.git --- diff --git a/gacela.lisp b/gacela.lisp index df3fe36..5cb515a 100644 --- a/gacela.lisp +++ b/gacela.lisp @@ -99,11 +99,12 @@ t) (defmacro progn-textures (&body code) - `(progn + `(let (values) (init-video-mode) (glEnable GL_TEXTURE_2D) - ,@code - (glDisable GL_TEXTURE_2D))) + (setq values (multiple-value-list (progn ,@code))) + (glDisable GL_TEXTURE_2D) + (apply #'values values))) (defun init-textures () (init-video-mode) diff --git a/gacela_draw.lisp b/gacela_draw.lisp index 67a3dde..88e7738 100644 --- a/gacela_draw.lisp +++ b/gacela_draw.lisp @@ -89,9 +89,9 @@ (defun draw-image-function (filename) (multiple-value-bind (texture width height) (load-texture filename) - (cond (texture - (lambda (&optional (f 1)) - (draw-rectangle (* f width) (* f height) :texture texture)))))) + (lambda (&optional (f 1)) + (cond (texture + (draw-rectangle (* f width) (* f height) :texture texture)))))) (defun draw-quad (v1 v2 v3 v4 &key texture color) (cond (texture (progn-textures