Hi Robert, I'm not sure exactly what to test. I was able to verify the following by printing out debug messages:
- The program is being dirtied - The shader is being compiled - The program is being linked - The program is being applied to osg::State Does osg::State do any sort of caching of Programs that could be preventing it from refreshing? -Farshid On 9/8/06, Robert Osfield <[EMAIL PROTECTED]> wrote:
Hi Farshid, What you are doing should work, I haven't tried it personally though... There are dirty mechanism in Program that should detect this change, so I'd recommend that you just put some debugging code into osg::Program and see what happens. Robert. On 9/8/06, Farshid Lashkari <[EMAIL PROTECTED]> wrote: > Hi, Should it be possible to change the osg::Shader of an osg::Program at runtime? When I try this the shader doesn't change. I use the following code to change the shader: program->removeShader(oldShader); program->addShader(newShader); The osg::INFO log will print out the source of the new shader and that it is relinking the program, and I get no errors. But the old shader is still being applied when the geometry is drawn. Am I doing something wrong? Thanks, Farshid _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/ _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
