diff options
-rw-r--r-- | chickadee/graphics/model.scm | 7 | ||||
-rw-r--r-- | examples/model.scm | 5 |
2 files changed, 10 insertions, 2 deletions
diff --git a/chickadee/graphics/model.scm b/chickadee/graphics/model.scm index 11e90d5..92d5a28 100644 --- a/chickadee/graphics/model.scm +++ b/chickadee/graphics/model.scm @@ -150,8 +150,13 @@ (%make-model name scenes default-scene render-state)) (define %depth-test (make-depth-test)) +(define %identity-matrix (make-identity-matrix4)) +(define %origin (vec3 0.0 0.0 0.0)) -(define* (draw-model model model-matrix view-matrix camera-position #:key +(define* (draw-model model #:key + (model-matrix %identity-matrix) + (view-matrix %identity-matrix) + (camera-position %origin) (skybox (default-skybox)) (lights '())) (with-graphics-state ((g:depth-test %depth-test) diff --git a/examples/model.scm b/examples/model.scm index 2c2f398..26067b6 100644 --- a/examples/model.scm +++ b/examples/model.scm @@ -27,7 +27,10 @@ (define (draw alpha) (with-projection projection - (draw-model model model-matrix view-matrix position)) + (draw-model model + #:model-matrix model-matrix + #:view-matrix view-matrix + #:camera-position position)) (draw-text text text-position)) (define (update dt) |