From b759213b0c812ba0ea93034420271ec77edd1e8d Mon Sep 17 00:00:00 2001 From: jsancho Date: Sun, 20 Dec 2009 08:54:53 +0000 Subject: [PATCH] --- gacela_draw.lisp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gacela_draw.lisp b/gacela_draw.lisp index d992ba5..dae68d4 100644 --- a/gacela_draw.lisp +++ b/gacela_draw.lisp @@ -155,10 +155,17 @@ (defun translate (x y &optional (z 0)) (glTranslatef x y z)) -(defun rotate (xrot yrot zrot) +(defun rotate (&rest rot) + (cond ((3d-mode?) (apply #'3d-rotate rot)) + (t (apply #'2d-rotate rot)))) + +(defun 3d-rotate (xrot yrot zrot) (glRotatef xrot 1 0 0) (glRotatef yrot 0 1 0) (glRotatef zrot 0 0 1)) (defun 2d-rotate (rot) - (rotate 0 0 rot)) \ No newline at end of file + (glRotatef rot 0 0 1)) + +(defun to-origin () + (glLoadIdentity)) -- 2.39.5