This is a simple question, is it possible to render multiple objects with the same shader BUT modify the value of a uniform between objects? For example:
myDisplay()
{
…
enbleShader(“simple”);
shader(“simple”)->setUniform(“color”)= blue;
drawQuad();
shader(“simple”)->setUniform(“color”)= red;
drawQuad();
shader(“simple”)->setUniform(“color”)= green;
drawQuad();
disableShader(“simple”);
…
}
Obviously this isn’t exact code but hopefully it is clear enough to explain my question. I’m having problems implementing something I thought was easy but it’s not working so I want to eliminate the obvious before diving into full debug mode…
thanks,
biv