How fast is glUseProgram()? Is there anything better (faster)?:
Here are my thoughts:
- Use 1 universal shader program, but with many input settings and attributes (settings for each graphics class)
- Use more than 1 shader for each graphics class
What state are uniforms in after changing the shader program? Do they save values (for example, values of matrices)?
Here are what I consider the benefits of #1 to be:
- Doesn't use glUseProgram()
And the benefits of #2:
- No matrix changes (for example, if class
Menu
and classScene3D
have different Projection matrices)