Added forgotten files from last commit.
[cl-glfw.git] / examples / simple.lisp
blob9b7c5a1665184e5a123ecf4c53d26535b44a2898
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.0d0 (/ 4.0d0 3.0d0) 0.1d0 50.0d0)))
7 (gl:clear gl:+color-buffer-bit+)
8 (gl:load-identity)
9 (gl:translate-f 0.0 0.0 -5.0)
10 (gl:rotate-d (* 10.0d0 (glfw:get-time)) 1d0 1d0 0d0)
11 (gl:rotate-d (* 90.0d0 (glfw:get-time)) 0d0 0d0 1d0)
12 (gl:with-begin gl:+triangles+
13 (gl:color-3f 1.0 0.0 0.0) (gl:vertex-3f 1.0 0.0 0.0)
14 (gl:color-3f 0.0 1.0 0.0) (gl:vertex-3f -1.0 1.0 0.0)
15 (gl:color-3f 0.0 0.0 1.0) (gl:vertex-3f -1.0 -1.0 0.0)))