summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2014-11-10 07:54:35 -0500
committerDavid Thompson <dthompson2@worcester.edu>2014-11-10 07:54:35 -0500
commit77f22c24c1703af399d105c2cf79de7b49254210 (patch)
treeaf632f1bdc263784a446087535a5d8816546c5c4
parentea451009ed97079bfe6aac9035ef1a0b56313c86 (diff)
render: Enable blending in render context.
* sly/render/context.scm (set-render-context-blend-mode!): Enable blending before applying a blend mode.
-rw-r--r--sly/render/context.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/sly/render/context.scm b/sly/render/context.scm
index 541661d..291e080 100644
--- a/sly/render/context.scm
+++ b/sly/render/context.scm
@@ -70,7 +70,9 @@
(define (set-render-context-blend-mode! context blend-mode)
(unless (equal? (render-context-blend-mode context) blend-mode)
(if blend-mode
- (apply-blend-mode blend-mode)
+ (begin
+ (gl-enable (enable-cap blend))
+ (apply-blend-mode blend-mode))
;; Turn off blending if there is no blend-mode specified.
(gl-disable (enable-cap blend)))
(%set-render-context-blend-mode! context blend-mode)))