summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2014-06-28 16:27:32 -0400
committerDavid Thompson <dthompson2@worcester.edu>2014-08-25 19:33:07 -0400
commitc5c6f9071aa15ba5bd35d058be04340846c4c8de (patch)
tree5ba1ac05913c3d9a53f55c520fc338676918799b
parent9878e5b5278b5fcbfc58d07a275b32a990760d89 (diff)
Accept strings instead of symbols for shader uniforms and attributes.
* 2d/shader.scm (uniform-location, attribute-location): Accept a string instead of a symbol.
-rw-r--r--sly/shader.scm6
1 files changed, 2 insertions, 4 deletions
diff --git a/sly/shader.scm b/sly/shader.scm
index 167cee5..489b77c 100644
--- a/sly/shader.scm
+++ b/sly/shader.scm
@@ -291,15 +291,13 @@ location."
(memoize
(lambda (shader-program name)
"Retrieve the location for the uniform NAME within SHADER-PROGRAM."
- (glGetUniformLocation (shader-program-id shader-program)
- (symbol->string name)))))
+ (glGetUniformLocation (shader-program-id shader-program) name))))
(define attribute-location
(memoize
(lambda (shader-program name)
"Retrieve the location for the uniform NAME within SHADER-PROGRAM."
- (glGetAttribLocation (shader-program-id shader-program)
- (symbol->string name)))))
+ (glGetAttribLocation (shader-program-id shader-program) name))))
(define (uniform-set! shader-program name value)
"Use the appropriate setter procedure to translate VALUE into OpenGL