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
)
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