Closed Max1412 closed 7 years ago
Right now, all uniforms must be updated at once.
Mabye change it to:
In ShaderProgram:
int getUniformLocation(std::string name);
void setUniform(std::string name, const vec3 & v);
(overloaded)
Advantages:
use()
will not update all uniformssetUniform
asks for the location every time it is calledAdvantages:
Advantages of both methods: No more template frenzy
Current Version (not one of the above) has now the following Improvement:
Advantages:
Disadvantages:
Write a (templated) class for uniforms so that the ShaderProgram can get objects of this class to update all uniforms when used