Windows issues parsing these characters. Bug fix for entering edit mode without setti...
[cowl.git] / examples / 01-hello-world.lisp
blob6f9b93e0385b7721df74a734fdc09fa47464dcf3
1 (require '#:asdf)
3 ;; this will load cowl, glfw and their bridging events layer (even though we
4 ;; don't ACTUALLY need it here, it's just convenient get them in one line).
5 (asdf:oos 'asdf:load-op '#:cowl-glfw)
7 (defun main ()
8 ;; High-level convenience macro from cl-glfw.
9 (glfw:do-window (:title "Cowl Hello World!" :width 400 :height 300)
10 ;; This is the init code, run once after the OpenGL context comes up.
11 ((setf cowl:*root-widget* (cowl:make-label "Hello world!" :x 100 :y 100))
12 (gl:enable gl:+blend+)
13 (gl:blend-func gl:+src-alpha+ gl:+one+))
15 ;; And the rest is the main loop.
16 (gl:clear gl:+color-buffer-bit+) ; wipe the display
18 (cowl:layout-root) ; compute the layout
19 (cowl:draw-root) ; render the widgets
21 ;; don't take up all the CPU
22 (sleep 0.04)))
24 (main)