X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=gacela.lisp;h=efdeb60e95d68f58d411ad69e086fe967a25ac70;hb=5293bb782051f9bfea3802151acb0c8644c98104;hp=62594b53508a1a15d7aa6fa1cc1672e929c955b3;hpb=678a1561ca858c34fecf04792831caf68559c2ac;p=gacela.git diff --git a/gacela.lisp b/gacela.lisp index 62594b5..efdeb60 100644 --- a/gacela.lisp +++ b/gacela.lisp @@ -25,7 +25,6 @@ (defvar *gacela-freq* 30) (defvar *transparent-color* '(:red 0 :green 0 :blue 0)) (defvar *background-color* '(:red 0 :green 0 :blue 0)) -(defvar *zoom* -10) ;;; SDL Initialization Subsystem (let (initialized) @@ -92,7 +91,7 @@ (glShadeModel GL_SMOOTH) (glClearColor 0 0 0 0) (glClearDepth 1) - (glEnable GL_DEPTH_TEST) + (glDisable GL_DEPTH_TEST) (glDepthFunc GL_LEQUAL) ; (glEnable GL_BLEND) ; (glBlendFunc GL_SRC_ALPHA GL_ONE) @@ -112,6 +111,8 @@ (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) @@ -355,7 +356,6 @@ (do () ((quit?)) (glClear (+ GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT)) (glLoadIdentity) - (translate 0 0 *zoom*) ,@code (SDL_GL_SwapBuffers) (SDL_Delay (- *gacela-freq* (rem (SDL_GetTicks) *gacela-freq*)))