From a3d98d979bca7f55c3fdbeda62f482374f140c73 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Wed, 22 Jun 2022 07:22:42 -0500 Subject: [fix] render in bitmap to include projection --- examples/01-bitmap-display.lisp | 11 +++++++---- 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))) -- cgit v1.2.3