diff options
author | David Thompson <dthompson2@worcester.edu> | 2015-01-25 12:40:21 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2015-01-26 17:40:59 -0500 |
commit | 7648fe4df578c4afcf2309b8a82c4070e68ee575 (patch) | |
tree | f5a73f2bbdef95b7a3428f07564cd9dfb9b8d253 | |
parent | aa4de8dafeabaaf48ea2b73ec9ce15c2a6da2354 (diff) |
render: context: Reset state after rendering.
Fixes state pollution issues where GL objects remained bound after
rendering.
* sly/render/context.scm (with-render-context): Call
'render-context-reset!' after evaluating the body.
-rw-r--r-- | sly/render/context.scm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sly/render/context.scm b/sly/render/context.scm index fb28eda..dc89fad 100644 --- a/sly/render/context.scm +++ b/sly/render/context.scm @@ -82,7 +82,9 @@ (%set-render-context-mesh! context #f)) (define-syntax-rule (with-render-context context body ...) - (begin (render-context-reset! context) body ...)) + (begin (render-context-reset! context) + body ... + (render-context-reset! context))) (define (set-render-context-blend-mode! context blend-mode) (unless (equal? (render-context-blend-mode context) blend-mode) |