summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2022-07-31 12:49:36 -0400
committerDavid Thompson <dthompson2@worcester.edu>2022-07-31 12:49:47 -0400
commita6343f2942b03f2f4c761c81c706bb0e83110010 (patch)
tree6220f3dc7c1e94a1203b698fba412eb86fbbd6d3
parentd42d1ca175820d802708ed1ec74f10b15e42e486 (diff)
node-2d: Apply blend mode in <sprite> render method.
-rw-r--r--starling/node-2d.scm7
1 files changed, 4 insertions, 3 deletions
diff --git a/starling/node-2d.scm b/starling/node-2d.scm
index 67ec6e6..2c4db01 100644
--- a/starling/node-2d.scm
+++ b/starling/node-2d.scm
@@ -691,9 +691,10 @@
(define-method (render (sprite <sprite>) alpha)
(let ((t (texture sprite)))
- (draw-sprite* t (size sprite) (world-matrix sprite)
- #:tint (tint sprite)
- #:texcoords (texture-gl-tex-rect t))))
+ (with-graphics-state ((g:blend-mode (blend-mode sprite)))
+ (draw-sprite* t (size sprite) (world-matrix sprite)
+ #:tint (tint sprite)
+ #:texcoords (texture-gl-tex-rect t)))))
;;;