Hi, I'm in a situation in which my Win32 process takes a lot of time to exit, something like 15-20 seconds. This happens as soon as I attach shaders to my geode.
Something I want to do first is to make sure I release OSG shader-related resources completely before exiting the application. Here is my code to use shaders then release them: Code: Geode *geode; Program *program = new Program(); Shader *vs = new Shader(...); Shader *fs = new Shader(...); program->addShader(vs); program->addShader(fs); geode->getOrCreateStateSet()->setAttributeAndMode(program, StateSet::ON); [...] // To free up resources I do: geode->setStateSet(new StateSet()); // obviously release all references to program, fs and vs here // I expect that, at this point, all shader-related stuff for OSG is gone Is this good enough? Cheers, Fred ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33252#33252 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org