From: jsancho Date: Fri, 28 Aug 2009 15:41:08 +0000 (+0000) Subject: (no commit message) X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=84698444ef733ef255a1a8d7bf3830b73f97bbe7;p=gacela.git --- diff --git a/gacela.lisp b/gacela.lisp index efdeb60..aea2df6 100644 --- a/gacela.lisp +++ b/gacela.lisp @@ -88,10 +88,10 @@ (defun init-GL () + (2d-mode) (glShadeModel GL_SMOOTH) (glClearColor 0 0 0 0) (glClearDepth 1) - (glDisable GL_DEPTH_TEST) (glDepthFunc GL_LEQUAL) ; (glEnable GL_BLEND) ; (glBlendFunc GL_SRC_ALPHA GL_ONE) @@ -108,12 +108,12 @@ (defun resize-screen-GL (width height) (let ((ratio (if (= height 0) width (/ width height)))) - (glViewPort 0 0 width height) +; (glViewPort 0 0 width height) (glMatrixMode GL_PROJECTION) (glLoadIdentity) (let* ((w (/ width 2)) (-w (neg w)) (h (/ height 2)) (-h (neg h))) (glOrtho -w w -h h 0 1)) - (gluPerspective 45 ratio 0.1 100) +; (gluPerspective 45 ratio 0.1 100) (glMatrixMode GL_MODELVIEW) (glLoadIdentity) t)) diff --git a/gacela_draw.lisp b/gacela_draw.lisp index d957cd7..40a6c4c 100644 --- a/gacela_draw.lisp +++ b/gacela_draw.lisp @@ -18,9 +18,11 @@ (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? ()