(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)
(defcfun "void gacela_glBlendFunc (int sfactor, int dfactor)" 0
"glBlendFunc (sfactor, dfactor);")
+(defcfun "void gacela_glOrtho (float left, float right, float bottom, float top, float near_val, float far_val)" 0
+ "glOrtho (left, right, bottom, top, near_val, far_val);")
+
(defcfun "void gacela_gluPerspective (double fovy, double aspect, double zNear, double zFar)" 0
"gluPerspective (fovy, aspect, zNear, zFar);")
(defentry glLightfv (int int float float float float) (void "gacela_glLightfv"))
(defentry glNormal3f (float float float) (void "gacela_glNormal3f"))
(defentry glBlendFunc (int int) (void "gacela_glBlendFunc"))
+(defentry glOrtho (float float float float float float) (void "gacela_glOrtho"))
(defentry gluPerspective (double double double double) (void "gacela_gluPerspective"))
(defentry gluBuild2DMipmaps (int int int int int int int) (int "gacela_gluBuild2DMipmaps"))
(multiple-value-bind
(texture width height) (load-texture filename)
(cond (texture
- (lambda (&optional (f 0.0172))
+ (lambda (&optional (f 1))
(draw-rectangle (* f width) (* f height) :texture texture))))))
(defun draw-quad (v1 v2 v3 v4 &key texture color)
(setq next (random-tetramine)))
(t (incf y) (start-timer timer)))))
- (funcall background 0.086)))
+ (funcall background)))
; (translate -25 19)
; (draw-grid (join-grids tetramine grid x y))
; (translate 40 40)