Gugja Sputnik
Gugja Sputnik

Reputation: 113

(OpenGL) Uniform is preserved after context loss?

glUniform is needed after context loss?

in other words, uniform data is preserved although context is lost?

e.g.

glUseProgram(program);
glUniform1i(location, 123);
glUseProgram(0);

/* ... !! Context is lost !! ... */

glUseProgram(program);
glUniform1i(location, 123); // <- needed? uniform is preserved?
glUseProgram(0);

Upvotes: 0

Views: 49

Answers (1)

Nicol Bolas
Nicol Bolas

Reputation: 473447

If the OpenGL context is lost, everything is gone. And yes, that includes program objects and their state.

Upvotes: 2

Related Questions