Assign to uniform from shader

It doesn’t seem to be allowed to assign to uniform parameters from inside the shader program? It would be a great way to help debugging.

It doesn’t seem to be allowed to assign to uniform parameters from inside the shader program?

Of course not. Uniforms, by definition, are uniform. Constant. They do not change across multiple executions of a shader. If you could set them from within a shader, they wouldn’t be uniform anymore.

You can initialize uniforms to a value, but they will only retain that value so long as you don’t set that uniform on that program from OpenGL. If you do, then the initialized value is lost.