From 4caddf93373a9704d66a9b1097de3c1d647c584a Mon Sep 17 00:00:00 2001 From: David Thompson Date: Fri, 7 Sep 2018 08:52:03 -0400 Subject: render: shader: Add support for vec3 uniform values. --- chickadee/render/shader.scm | 10 +++++----- 1 file 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!) -- cgit v1.2.3