1 (let ((rtri 0) (rquad 0))
3 (glTranslatef -1.5 0 -10)
5 (draw '((1 0 0) (0 1 0)) '((0 1 0) (-1 -1 1)) '((0 0 1) (1 -1 1)))
6 (draw '((1 0 0) (0 1 0)) '((0 0 1) (1 -1 1)) '((0 1 0) (1 -1 -1)))
7 (draw '((1 0 0) (0 1 0)) '((0 1 0) (1 -1 -1)) '((0 0 1) (-1 -1 -1)))
8 (draw '((1 0 0) (0 1 0)) '((0 0 1) (-1 -1 -1)) '((0 1 0) (-1 -1 1)))
11 (glRotatef rquad 1 0 0)
13 (draw '(1 1 -1) '(-1 1 -1) '(-1 1 1) '(1 1 1))
14 (draw-color '(1 0.5 0))
15 (draw '(1 -1 1) '(-1 -1 1) '(-1 -1 -1) '(1 -1 -1))
17 (draw '(1 1 1) '(-1 1 1) '(-1 -1 1) '(1 -1 1))
19 (draw '(1 -1 -1) '(-1 -1 -1) '(-1 1 -1) '(1 1 -1))
21 (draw '(-1 1 1) '(-1 1 -1) '(-1 -1 -1) '(-1 -1 1))
23 (draw '(1 1 -1) '(1 1 1) '(1 -1 1) '(1 -1 -1))
28 (let ((rquad 0) (texture (load-texture "../nehe/lesson06/data/nehe.bmp")))
29 (defun cube-texture ()
30 (glTranslatef -1.5 0 -10)
31 (glRotatef rquad 0 1 0)
32 (draw-quad '(1 1 -1) '(-1 1 -1) '(-1 1 1) '(1 1 1) :texture texture)
33 (draw-quad '(1 -1 1) '(-1 -1 1) '(-1 -1 -1) '(1 -1 -1) :texture texture)
34 (draw-quad '(1 1 1) '(-1 1 1) '(-1 -1 1) '(1 -1 1) :texture texture)
35 (draw-quad '(1 -1 -1) '(-1 -1 -1) '(-1 1 -1) '(1 1 -1) :texture texture)
36 (draw-quad '(-1 1 1) '(-1 1 -1) '(-1 -1 -1) '(-1 -1 1) :texture texture)
37 (draw-quad '(1 1 -1) '(1 1 1) '(1 -1 1) '(1 -1 -1) :texture texture)
40 (let ((xrot 0) (yrot 0) (zrot 0)
41 (texture (load-texture "../nehe/lesson07/data/crate.bmp"))
42 (light (add-light :light '(1 1 1 1) :position '(0 0 2 1) :ambient '(0.5 0.5 0.5 1))))
46 (glEnable GL_TEXTURE_2D)
47 (glTranslatef -2 0 -13)
48 (rotate xrot yrot zrot)
49 (draw-cube :size 1 :texture texture)
54 (let ((xrot 0) (yrot 0) (zrot 0)
55 (texture (load-texture "../nehe/lesson08/data/glass.bmp")))
59 (glEnable GL_TEXTURE_2D)
60 (glTranslatef 2 0 -13)
61 (rotate xrot yrot zrot)
62 (draw-cube :size 1 :texture texture)
67 (run-game "GL Test" (quad) (quad2))