diff options
author | David Thompson <dthompson2@worcester.edu> | 2018-09-07 08:52:03 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2018-09-07 08:52:03 -0400 |
commit | 4caddf93373a9704d66a9b1097de3c1d647c584a (patch) | |
tree | bfc078d5123f819c381f41e600452757a8691076 | |
parent | c5380101fe51ad40361ed671c13e987faf742826 (diff) |
render: shader: Add support for vec3 uniform values.
-rw-r--r-- | chickadee/render/shader.scm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/chickadee/render/shader.scm b/chickadee/render/shader.scm index cb4426f..fdb683a 100644 --- a/chickadee/render/shader.scm +++ b/chickadee/render/shader.scm @@ -144,8 +144,8 @@ (define (set-float-vector2-uniform! location v) (gl-uniform2fv location 1 (vec2->pointer v))) -;; (define (set-float-vector3-uniform! location v) -;; (gl-uniform3f location (vx v) (vy v) (vz v))) +(define (set-float-vector3-uniform! location v) + (gl-uniform3fv location 1 (vec3->pointer v))) (define (set-float-vector4-uniform! location v) (if (color? v) @@ -199,8 +199,8 @@ ('int 0) ('unsigned-int 0) ('float 0.0) - ('float-vec2 (vec2 0.0 0.0)) - ;; ('float-vec3 (vector3 0.0 0.0 0.0)) + ('float-vec2 #v(0.0 0.0)) + ('float-vec3 #v(0.0 0.0 0.0)) ('float-vec4 (make-color 0.0 0.0 0.0 0.0)) ;; ('int-vec2 (vector2 0 0)) ;; ('int-vec3 (vector3 0 0 0)) @@ -215,7 +215,7 @@ ('unsigned-int set-unsigned-integer-uniform!) ('float set-float-uniform!) ('float-vec2 set-float-vector2-uniform!) - ;; ('float-vec3 set-float-vector3-uniform!) + ('float-vec3 set-float-vector3-uniform!) ('float-vec4 set-float-vector4-uniform!) ;; ('int-vec2 set-integer-vector2-uniform!) ;; ('int-vec3 set-integer-vector3-uniform!) |