X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=gacela_draw.lisp;h=00eb5516208f950a952201b59a9f3a8dc06959a9;hb=d89eeb0212cedfe8480e080d32db0644dceb7985;hp=947da6b5381173c4729911690b09d55ec7cd27d9;hpb=fdfb434956fca60457a18b4ab5cb0df067ec9a8b;p=gacela.git diff --git a/gacela_draw.lisp b/gacela_draw.lisp index 947da6b..00eb551 100644 --- a/gacela_draw.lisp +++ b/gacela_draw.lisp @@ -16,18 +16,6 @@ (in-package :gacela) -(let ((mode '2d)) - (defun 2d-mode () - (glDisable GL_DEPTH_TEST) - (setq mode '2d)) - - (defun 3d-mode () - (glEnable GL_DEPTH_TEST) - (setq mode '3d)) - - (defun 3d-mode? () - (eq mode '3d))) - (defmacro with-color (color &body code) `(let ((original-color (get-current-color))) (apply #'set-current-color ,color) @@ -161,7 +149,10 @@ (defun translate (x y &optional (z 0)) (glTranslatef x y z)) -(defun rotate (xrot yrot &optional zrot) +(defun rotate (xrot yrot zrot) (glRotatef xrot 1 0 0) (glRotatef yrot 0 1 0) - (cond (zrot (glRotatef zrot 0 0 1)))) + (glRotatef zrot 0 0 1)) + +(defun 2d-rotate (rot) + (rotate 0 0 rot)) \ No newline at end of file