diff options
author | Colin Okay <colin@cicadas.surf> | 2022-06-22 07:22:42 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-06-22 07:22:42 -0500 |
commit | a3d98d979bca7f55c3fdbeda62f482374f140c73 (patch) | |
tree | 4fd80f62ead1f7e3a6f3b96a2e8dc232869886a4 | |
parent | 534de77b36f53d5180f32b0d82faa8d289601f8e (diff) |
[fix] render in bitmap to include projection
-rw-r--r-- | examples/01-bitmap-display.lisp | 11 | ||||
-rw-r--r-- | wheelwork.lisp | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/examples/01-bitmap-display.lisp b/examples/01-bitmap-display.lisp index fa743fa..788ae6d 100644 --- a/examples/01-bitmap-display.lisp +++ b/examples/01-bitmap-display.lisp @@ -9,10 +9,13 @@ (defclass bitmap-display (ww::application ) ()) (defmethod ww::boot ((app bitmap-display)) - (ww::add-unit - app - (make-instance 'ww::bitmap - :texture (ww::get-asset "Fezghoul.png")))) + (let ((bm + (make-instance 'ww::bitmap + :texture (ww::get-asset "Fezghoul.png")))) + (describe (ww::model-matrix bm)) + (describe bm) + (describe app) + (ww::add-unit app bm))) (defun start () diff --git a/wheelwork.lisp b/wheelwork.lisp index 6ad9107..42dd830 100644 --- a/wheelwork.lisp +++ b/wheelwork.lisp @@ -333,7 +333,7 @@ order). Makes sure to remove the unit from its current container if necessary." (gl:program-uniform-matrix-4fv shader (gl:get-uniform-location shader "TRANSFORM") - (mat:marr (model-matrix bitmap))) + (mat:marr (mat:m* (application-projection *application*) (model-matrix bitmap)))) (gl:bind-vertex-array vao) (gl:draw-arrays :triangles 0 6) (gl:bind-vertex-array 0))) |