1 (in-package :lambdamundo
)
3 ;; called when window is resized
6 (defmacro with-lambdamundo-window
((title &key
8 (colourbits '(:redbits
0 :greenbits
0 :bluebits
0 :alphabits
0))
13 "Top level form for managing our window."
14 (destructuring-bind (width height
)
16 (destructuring-bind (redbits greenbits bluebits alphabits
)
18 (destructuring-bind (&key pre start main end
27 (glfw:with-init-window
(,title
,width
,height
,redbits
,greenbits
,bluebits
,alphabits
,depthbits
,stencilbits
,mode
)
30 `(glfw:set-mouse-button-callback
(cffi:callback
,mouse-callback
)))
32 `(glfw:set-key-callback
(cffi:callback
,key-callback
)))
33 ,(when resize-callback
34 `(glfw:set-window-size-callback
(cffi:callback
,resize-callback
)))
36 `(glfw:set-char-callback
(cffi:callback
,char-callback
)))
40 (while (eql (glfw:get-window-param glfw
:+opened
+) gl
:+true
+)))