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