From: jsancho Date: Sun, 20 Dec 2009 08:54:53 +0000 (+0000) Subject: (no commit message) X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=b759213b0c812ba0ea93034420271ec77edd1e8d;p=gacela.git --- 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))