shaders and OnResume()

Started by lawless_c, July 24, 2015, 01:13:15 AM

Previous topic - Next topic

lawless_c

I've been having a problem for a while now with glsl shaders and OnResume().
Upon leaving my app to check something else i found the shaders would lose certain important data such as a colour value , what i would end up with
are shaders that instead of fading to the colour i wanted simply faded to black.

Simple fix i found was to use setUniform instead of setStaticUniform in my renderhooks.

Just thought i would let you all know as i was only able mention of similar problems involving textures and onresume but not shaders.

EgonOlsen

Yes, that's normal behaviour. On a context loss, the shaders are losing all their data. So either use setUniform or recall setStaticUniform after the restart.

EgonOlsen

...I should add this to the documentation, I guess.