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