diff options
-rw-r--r-- | sly/render/group.scm | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/sly/render/group.scm b/sly/render/group.scm index e3e53a3..ddcc94f 100644 --- a/sly/render/group.scm +++ b/sly/render/group.scm @@ -90,17 +90,19 @@ or not to render child nodes." (array-set! matrix 0 3 2) (array-set! matrix 1 3 3))) -(define (draw-group group camera context) - "Draw the scene defined by GROUP as viewed by CAMERA, with the given +(define draw-group + (let ((context (make-render-context))) + (lambda* (group camera #:optional (context context)) + "Draw the scene defined by GROUP as viewed by CAMERA, with the given render CONTEXT." - (with-temp-transform context view - (transform*! view - (camera-location camera) - (camera-projection camera)) - (with-temp-transform context base-transform - (set-transform-identity! base-transform) - (apply-viewport (camera-viewport camera)) - (%draw-group group base-transform view context)))) + (with-temp-transform context view + (transform*! view + (camera-location camera) + (camera-projection camera)) + (with-temp-transform context base-transform + (set-transform-identity! base-transform) + (apply-viewport (camera-viewport camera)) + (%draw-group group base-transform view context)))))) ;;; ;;; Utility Procedures |