6

I have a shader which has several uniform variables:

uniform vec4 a;
uniform vec4 b;
uniform vec4 c;

I'm getting these handles using glGetUniformLocation() and storing them in the array. The game was suspended, then resumed and onSurfaceCreated() has been called. The question is: whether these handles will be valid or I need to re-get them using glGetUniformLocation() once again?

Netherwire
  • 275
  • 2
  • 6

1 Answers1

6

The uniform locations are set when the program is linked and are tied to the program.

This means that when you create a new program then the uniform locations can change.

ratchet freak
  • 5,950
  • 16
  • 28