Hi CG

When your remove a shader, "void Program::dirtyProgram()" is called to
request a relink in the next frame.
Program is relinked in the next frame in "void Program::apply( osg::State&
state ) const" method.
Follow your code in a debugger to see if all is properly done.

Are you sure your shader is well removed from your program ?

HTH
David Callu

2008/6/12 CG <[EMAIL PROTECTED]>:

>
> Hi David,
>
> I'm using osg 2.4 and osgViewer.
>
> Regards,
> Cg
>
>  ------------------------------
> Date: Thu, 12 Jun 2008 11:09:49 +0200
> From: [EMAIL PROTECTED]
> To: osg-users@lists.openscenegraph.org
> Subject: Re: [osg-users] Shader Problem
>
>
> hi CG
>
> when you remove a shader, osg::Program need to be relinked.
> this is done by osgUtil::GLObjectVisitor in osgViewer::Renderer::draw
> method.
> So this seem can be done at runtime.
>
> Which OSG version did you use ?
> Did you use osgViewer ?
>
> David Callu
>
>
> 2008/6/12 CG <[EMAIL PROTECTED]>:
>
> Hi all,
>
> Are there any ways to remove the shader during runtime? I've tried
> the removeShader function but the effect of the shader is still applied to
> my models (e.g tank) i.e. the appearance of the models do not go back to the
> state before shader is applied.
>
> Regards,
> Cg
> ------------------------------
> Chat online and in real-time with friends and family! Windows Live
> Messenger <http://get.live.com/messenger/overview>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
>
> ------------------------------
> Always-on security tools provide safer ways to connect and share anywhere.
> Find out more. Windows Live <http://get.live.com/familysafety/overview>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to