Search
lxdream.org :: lxdream/src/pvr2/gl_sl.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/gl_sl.c
changeset 1209:e606e65eaf54
prev1208:6955202d6408
next1229:dc935eee9767
author nkeynes
date Tue Feb 07 11:59:07 2012 +1000 (7 years ago)
permissions -rw-r--r--
last change Add enable/disable vertex attribute calls when making a shader active
Add vec3 uniform setter
file annotate diff log raw
1.1 --- a/src/pvr2/gl_sl.c Tue Feb 07 11:44:19 2012 +1000
1.2 +++ b/src/pvr2/gl_sl.c Tue Feb 07 11:59:07 2012 +1000
1.3 @@ -167,6 +167,7 @@
1.4
1.5 #define glsl_set_uniform_sampler1D(id,v) glUniform1iARB(id,v)
1.6 #define glsl_set_uniform_sampler2D(id,v) glUniform1iARB(id,v)
1.7 +#define glsl_set_uniform_vec3(id,v) glUniform3fvARB(id,1,v)
1.8 #define glsl_set_uniform_vec4(id,v) glUniform4fvARB(id,1,v)
1.9 #define glsl_set_uniform_mat4(id,v) glUniformMatrix4fvARB(id,1,GL_FALSE,v)
1.10 #define glsl_set_attrib_vec3(id,stride,v) glVertexAttribPointerARB(id, 3, GL_FLOAT, GL_FALSE, stride, v)
1.11 @@ -293,6 +294,7 @@
1.12
1.13 #define glsl_set_uniform_sampler1D(id,v) glUniform1i(id,v)
1.14 #define glsl_set_uniform_sampler2D(id,v) glUniform1i(id,v)
1.15 +#define glsl_set_uniform_vec3(id,v) glUniform3fv(id,1,v)
1.16 #define glsl_set_uniform_vec4(id,v) glUniform4fv(id,1,v)
1.17 #define glsl_set_uniform_mat4(id,v) glUniformMatrix4fv(id,1,GL_FALSE,v)
1.18 #define glsl_set_attrib_vec3(id,stride,v) glVertexAttribPointer(id, 3, GL_FLOAT, GL_FALSE, stride, v)
1.19 @@ -350,6 +352,7 @@
1.20 }
1.21
1.22 #define glsl_set_uniform_sampler2D(id,v)
1.23 +#define glsl_set_uniform_vec3(id,v)
1.24 #define glsl_set_uniform_vec4(id,v)
1.25 #define glsl_set_uniform_mat4(id,v)
1.26 #define glsl_set_attrib_vec3(id,stride,v)
.