Max1412 / Graphics2

OpenGL framework for prototyping and small projects
14 stars 4 forks source link

Uniform Class #1

Closed Max1412 closed 7 years ago

Max1412 commented 7 years ago

Write a (templated) class for uniforms so that the ShaderProgram can get objects of this class to update all uniforms when used

Max1412 commented 7 years ago

Right now, all uniforms must be updated at once.

Mabye change it to:

Method 1

In ShaderProgram: int getUniformLocation(std::string name); void setUniform(std::string name, const vec3 & v); (overloaded)

Advantages:

Alternatively (like the cookbook)

Advantages:

Advantages of both methods: No more template frenzy

Max1412 commented 7 years ago

Current Version (not one of the above) has now the following Improvement:

Advantages:

Disadvantages: