Automatic conversion of gl:booleans, gl:floats and gl:doubles.
[cl-glfw.git] / examples / simple.lisp
blob52c6ec68257b39796ee625488b2cacf799d2903b
1 (require '#:asdf)
2 (asdf:oos 'asdf:load-op '#:cl-glfw)
4 (glfw:do-window ("A Simple Example")
5 ((gl:with-setup-projection
6 (glu:perspective 45 4/3 0.1 50)))
7 (gl:clear gl:+color-buffer-bit+)
8 (gl:load-identity)
9 (gl:translate-f 0 0 -5)
10 (gl:rotate-f (* 10 (glfw:get-time)) 1 1 0)
11 (gl:rotate-f (* 90 (glfw:get-time)) 0 0 1)
12 (gl:with-begin gl:+triangles+
13 (gl:color-3f 1 0 0) (gl:vertex-3f 1 0 0)
14 (gl:color-3f 0 1 0) (gl:vertex-3f -1 1 0)
15 (gl:color-3f 0 0 1) (gl:vertex-3f -1 -1 0)))