cinder/Cinder — pull request #153 by reakinator (2012-03-09 05:52:02+00:00)
Title: Glsl overload uniforms

These changes make it so you can provide a GLint loc as first argument to the various GlslProg::uniform() methods. This is beneficial for two reasons:

* all the glGetUniformLocation calls can be done directly after shader compile time, so you don't need to do it at draw time, you just pass in the handle.
* It is more straightforward to run sanity checks this way - you retrieve the handle after the shader is compiled, check for any -1's, and if there aren't any, use that handle later when you need it.

I thought about using templates for the methods that take std::strings just to reduce the amount of repeated code, but this gets confusing for the Matrix variants, since they can be used with only 2 parameters (and then what happens to the bool transpose?).

I can reformat if desired.