<div dir="ltr">Hi @all,<br><br>I built a prototypical Android application based on your OSG GLES 2.0<br>example. As also users in the OSG forum pointed out, the problem with<br>this example application is, that is reinitialized everything, when<br>e.g. leaving the app, changing the screen orientation and so on.<br><br>I worked around this by just calling again<br>'setUpViewerAsEmbeddedInWindow' instead of creating everything from<br>scratch.<br><br>This seems to work pretty well, but sometimes - after a EGL context<br>loss - the shader programs are somehow lost or invalid, resulting in a<br>wrong rendering. This even happens, when using OSG's default shaders.<br><br>When debugging OSG, it seems to me, that OSG tries to clean up all GL<br>objects - including the shaders and reinitialize everything (also<br>compiling the shader objects).<br><br>Still, it happens, that the shaders get invalid sometimes and I'll get<br>the error:<br><br>   s_glUseProgram:2041 GL error 0x501<br><br>Which basically means invalid program. Are the shader handled somehow<br>differently? What do I have to do, in order to properly cleanup<br>everything?<br><br>Does anyone of you have any example surviving correctly a context loss<br>e.g. due to application switch?<br><br>Here are forum entries that describe a similar problem:<br><br><a href="http://forum.openscenegraph.org/viewtopic.php?t=11270">http://forum.openscenegraph.org/viewtopic.php?t=11270</a><div><div><a href="http://forum.openscenegraph.org/viewtopic.php?t=14549">http://forum.openscenegraph.org/viewtopic.php?t=14549</a> (see point number 4.)<br><br><br>Best regards,<br>Martin</div></div></div>