summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2014-09-06 15:46:56 -0400
committerDavid Thompson <dthompson2@worcester.edu>2014-09-06 15:46:56 -0400
commit46f7884f9517a9717b2777e64ce94100a338f27e (patch)
tree395e86c7cd785149123698ea3d28c14d31da7304
parent51615bdb94d91fd0dad0e77620b05ddac6cd4162 (diff)
mesh: Allow uniform values to be signals.
* sly/mesh.scm (draw-mesh): Deference uniform values that are signals.
-rw-r--r--sly/mesh.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/sly/mesh.scm b/sly/mesh.scm
index 483c9cd..cd8f680 100644
--- a/sly/mesh.scm
+++ b/sly/mesh.scm
@@ -35,6 +35,7 @@
#:use-module (sly shader)
#:use-module (sly texture)
#:use-module (sly vector)
+ #:use-module (sly signal)
#:export (make-mesh
mesh?
mesh-length
@@ -188,7 +189,8 @@
(for-each (lambda (uniform)
(match uniform
((name value)
- (uniform-set! (mesh-shader mesh) name value))))
+ (uniform-set! (mesh-shader mesh) name
+ (signal-ref-maybe value)))))
uniforms)
(with-vertex-array (mesh-vao mesh)
(if (texture? (mesh-texture mesh))