When glfw is not compiled as a framework, load the dynlib
[cl-glfw.git] / examples / ftgl-text.lisp
blob95e8c1ebe8939af91e71d40019561cde8a548067
1 (require '#:asdf)
2 (asdf:oos 'asdf:load-op '#:cl-glfw)
3 (asdf:oos 'asdf:load-op '#:cl-glfw-opengl-version_1_1)
4 (asdf:oos 'asdf:load-op '#:cl-glfw-glu)
5 (asdf:oos 'asdf:load-op '#:cl-glfw-ftgl)
7 (let (font)
8 (glfw:do-window (:title "FTGL Text example")
9 ((gl:with-setup-projection
10 (glu:perspective 45 4/3 10 500))
11 (setf font (ftgl:create-texture-font))
12 (ftgl:set-font-face-size font 20 0))
13 (gl:clear gl:+color-buffer-bit+)
14 (gl:load-identity)
15 (gl:translate-f 0 0 -400)
16 (gl:rotate-f (* 10 (glfw:get-time)) 1 1 0)
17 (gl:rotate-f (* 90 (glfw:get-time)) 0 0 1)
18 (ftgl:render-font font "Hello world!" :all)))