X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=gacela.lisp;h=a7045cee8dfa718a17c0ff5eedfd9e9d7d69a40c;hb=41c9fd5f4de137f599da657390fd53372ee06b05;hp=d5d28525a2f56718f986c9704f302937858eee39;hpb=4cb43f867b6a2fcf40ced44ac937d8930005d01e;p=gacela.git diff --git a/gacela.lisp b/gacela.lisp index d5d2852..a7045ce 100644 --- a/gacela.lisp +++ b/gacela.lisp @@ -86,16 +86,16 @@ (glEnable GL_LIGHTING)) (defun resize-screen-GL (width height) - (let ((ratio (if (= height 0) width (/ 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) - (glMatrixMode GL_MODELVIEW) - (glLoadIdentity) - t)) + (cond ((3d-mode?) (glViewPort 0 0 width height))) + (glMatrixMode GL_PROJECTION) + (glLoadIdentity) + (cond ((3d-mode?) (let ((ratio (if (= height 0) width (/ width height)))) + (gluPerspective 45 ratio 0.1 100))) + (t (let* ((w (/ width 2)) (-w (neg w)) (h (/ height 2)) (-h (neg h))) + (glOrtho -w w -h h 0 1)))) + (glMatrixMode GL_MODELVIEW) + (glLoadIdentity) + t)) (let ((current-color '(1 1 1 1))) (defun get-current-color ()