summaryrefslogtreecommitdiff
path: root/sly/render
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2014-12-06 11:18:56 -0500
committerDavid Thompson <dthompson2@worcester.edu>2014-12-06 13:20:49 -0500
commit30bd4bdf2bf9b18b671538be4749148d02ccfcc3 (patch)
treecdbc75221cadec2c8f3f9ffc7959249516577f94 /sly/render
parentc577f2cbd49c2b93c67855310618f72998c0f172 (diff)
render: group: Properly reset render context before rendering.
* sly/render/group.scm (draw-group): Use with-render-context macro.
Diffstat (limited to 'sly/render')
-rw-r--r--sly/render/group.scm17
1 files changed, 9 insertions, 8 deletions
diff --git a/sly/render/group.scm b/sly/render/group.scm
index 7ccb582..9cfc062 100644
--- a/sly/render/group.scm
+++ b/sly/render/group.scm
@@ -95,14 +95,15 @@ or not to render child nodes."
(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-render-context 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