summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2021-05-10 17:13:30 -0400
committerDavid Thompson <dthompson2@worcester.edu>2021-05-10 17:13:30 -0400
commit857317c4b65047f7c77366f73c25b7191f8f0286 (patch)
tree5bfcd2763458c36dfc3ca3d5c592df3e2a5da1f0
parent3bbb377e2ceecea3c1ed7abdad7db6f506f70f20 (diff)
graphics: model: Fix matrix multiplication order errors.
-rw-r--r--chickadee/graphics/model.scm6
1 files changed, 3 insertions, 3 deletions
diff --git a/chickadee/graphics/model.scm b/chickadee/graphics/model.scm
index 0d8947c..152cee9 100644
--- a/chickadee/graphics/model.scm
+++ b/chickadee/graphics/model.scm
@@ -91,8 +91,8 @@
(define (render-state-world-model-matrix-mult! state matrix)
(matrix4-mult! (render-state-world-model-matrix state)
- (render-state-model-matrix state)
- matrix))
+ matrix
+ (render-state-model-matrix state)))
;;;
@@ -1019,7 +1019,7 @@
(match translation
(#(x y z)
(matrix4-translate (vec3 x y z))))))))
- (world-matrix (matrix4* parent-matrix matrix))
+ (world-matrix (matrix4* matrix parent-matrix))
(mesh (match (number-ref/optional obj "mesh")
(#f #f)
(n (vector-ref meshes n))))