diff options
author | Colin Okay <colin@cicadas.surf> | 2022-07-06 09:33:14 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-07-06 09:33:14 -0500 |
commit | fda1d9d08349dfe103b7af3ef8f305c1701933f6 (patch) | |
tree | 5cb896cf87d140df5bd05cb1f56566cfb0f17407 /src/application.lisp | |
parent | 8c94460d8c8f8b44ca9bcdebbf2906e84c969b19 (diff) |
[refactor] containers have render bounds
Diffstat (limited to 'src/application.lisp')
-rw-r--r-- | src/application.lisp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/application.lisp b/src/application.lisp index d38cd8a..d2da8ef 100644 --- a/src/application.lisp +++ b/src/application.lisp @@ -3,7 +3,6 @@ (in-package #:wheelwork) - (defclass/std application (container interactive) ((title :with :std "Wheelwork App") (asset-root :ri :std #P"./" :doc "Directory under which assets are stored.") @@ -21,7 +20,6 @@ (fps :std 30 :doc "Frames Per Second") (frame-wait :r))) - (defun can-set-projection-p (app) (and (slot-boundp app 'width) (slot-boundp app 'height) @@ -35,7 +33,13 @@ (defmethod initialize-instance :after ((app application) &key) (set-projection app) - (setf (listener app) (make-instance 'listener))) + (with-slots (listener left right top bottom scale width height) app + (setf listener (make-instance 'listener) + left 0 + bottom 0 + top (/ height scale) + right (/ width scale) + ))) (defun fire-blur-event-on (thing) (when-let (blur-handlers (and thing (get-handlers-for thing 'blur))) @@ -96,7 +100,6 @@ those objects are currently part of the scene tree." (gl:clear :color-buffer-bit) (gl:enable :blend) (gl:blend-func :src-alpha :one-minus-src-alpha ) - (dolist (thing (container-units app)) - (render thing)) + (call-next-method) (sdl2:gl-swap-window (application-window app)) (sleep (frame-wait app))) |