<html>
<body>
  <div id="body" style="background-color:#ffffff;" >
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head" style="border-bottom-width:1px;border-bottom-style:solid;" ><td class="headtd" style="padding:0;padding-top:.2em;" colspan="4">Commit in <b><tt>lxdream/src</tt></b></td></tr>
<tr><td><tt>pvr2/<a href="#file1">gl_sl.c</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+3</td><td></td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">6955202d6408 -> e606e65eaf54</td></tr>
<tr class="alt" style=";" ><td><tt>tools/<a href="#file2">genglsl.c</a></tt></td><td id="addedalt" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ccf7cc;" align="right">+7</td><td></td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">6955202d6408 -> e606e65eaf54</td></tr>
<tr><td></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+10</td><td></td><td></td></tr>
</table>
<small id="info" style="color: #888888;" >2 modified files</small><br />
<pre class="comment" style="white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;padding:4px;border:1px dashed #000000;background-color:#ffffdd;" >
Add enable/disable vertex attribute calls when making a shader active
Add vec3 uniform setter
</pre>
<hr /><a name="file1" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src/pvr2</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>gl_sl.c</b></big> <small id="info" style="color: #888888;" >6955202d6408 -> e606e65eaf54</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/pvr2/gl_sl.c
+++ lxdream/src/pvr2/gl_sl.c
@@ -167,6 +167,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 #define glsl_set_uniform_sampler1D(id,v) glUniform1iARB(id,v)
 #define glsl_set_uniform_sampler2D(id,v) glUniform1iARB(id,v)
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#define glsl_set_uniform_vec3(id,v) glUniform3fvARB(id,1,v)
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #define glsl_set_uniform_vec4(id,v) glUniform4fvARB(id,1,v)
 #define glsl_set_uniform_mat4(id,v) glUniformMatrix4fvARB(id,1,GL_FALSE,v)
 #define glsl_set_attrib_vec3(id,stride,v) glVertexAttribPointerARB(id, 3, GL_FLOAT, GL_FALSE, stride, v)
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -293,6 +294,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 #define glsl_set_uniform_sampler1D(id,v) glUniform1i(id,v)
 #define glsl_set_uniform_sampler2D(id,v) glUniform1i(id,v)
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#define glsl_set_uniform_vec3(id,v) glUniform3fv(id,1,v)
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #define glsl_set_uniform_vec4(id,v) glUniform4fv(id,1,v)
 #define glsl_set_uniform_mat4(id,v) glUniformMatrix4fv(id,1,GL_FALSE,v)
 #define glsl_set_attrib_vec3(id,stride,v) glVertexAttribPointer(id, 3, GL_FLOAT, GL_FALSE, stride, v)
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -350,6 +352,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > }
 
 #define glsl_set_uniform_sampler2D(id,v)
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#define glsl_set_uniform_vec3(id,v)
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #define glsl_set_uniform_vec4(id,v)
 #define glsl_set_uniform_mat4(id,v)
 #define glsl_set_attrib_vec3(id,stride,v)
</pre></div>
<hr /><a name="file2" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src/tools</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>genglsl.c</b></big> <small id="info" style="color: #888888;" >6955202d6408 -> e606e65eaf54</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/tools/genglsl.c
+++ lxdream/src/tools/genglsl.c
@@ -317,6 +317,9 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >                 fprintf( f, "void glsl_set_%s_%s(%s value); /* uniform %s %s */ \n", program->name, var->name, getCType(var->type,var->uniform), var->type, var->name );
             } else {
                 fprintf( f, "void glsl_set_%s_%s_pointer(%s ptr, GLint stride); /* attribute %s %s */ \n", program->name, var->name, getCType(var->type,var->uniform), var->type, var->name);
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+                if( strcmp(var->type,"vec4") == 0 ) { /* Special case */
+                    fprintf( f, "void glsl_set_%s_%s_vec3_pointer(%s ptr, GLint stride); /* attribute %s %s */ \n", program->name, var->name, getCType(var->type,var->uniform), var->type, var->name);
+                }
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >             }
         }
     }
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -402,6 +405,10 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >             } else {
                 fprintf( f, "void glsl_set_%s_%s_pointer(%s ptr, GLsizei stride){ /* attribute %s %s */ \n", program->name, var->name, getCType(var->type,var->uniform), var->type, var->name);
                 fprintf( f, "    glsl_set_attrib_%s(var_%s_%s_loc,stride, ptr);\n}\n", var->type, program->name, var->name );
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+                if( strcmp(var->type,"vec4") == 0 ) { /* Special case to load vec3 arrays into a vec4 */
+                    fprintf( f, "void glsl_set_%s_%s_vec3_pointer(%s ptr, GLsizei stride){ /* attribute %s %s */ \n", program->name, var->name, getCType(var->type,var->uniform), var->type, var->name);
+                    fprintf( f, "    glsl_set_attrib_vec3(var_%s_%s_loc,stride, ptr);\n}\n", program->name, var->name );
+                }
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >             }
         }
     }
</pre></div>
<center><small>Chaos Theory</small></center>
</div></body></html>