Hi xiaoshuxing,
How are you updating the shader source? Updating the shader source
string itself should be enough to get the OSG to reload and relink the
related programs, you shouldn't need to manually call dirtyProgram.
Robert.
On 10/31/06, xiaoshuxing <[EMAIL PROTECTED]> wrote:
Hi, I've a GLSL program attached to some of the node in the
scenegraph, but this shader maybe edited when the program is running, how
can I recompile the shader after the GLSL source is modified? I've tried the
following code, which seems doesn't work:
void ShaderReloadVisitor::apply(osg::Billboard &b)
{
osg::ref_ptr<osg::Program> p =
dynamic_cast<osg::Program*>(b.getStateSet()->getAttribute(StateAttribute::PROGRAM));
p->dirtyProgram();
break;
}
Is there anything I missed?
Thanks .
_______________________________________________
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/