Hi Pierre,

I haven't attempted running your problem, but had a quick scan through.

I don't know of any bugs relating to removal of attributes.  In your
instance I'd guess that it could be that the scene graph isn't
resetting back to fixed function pipeline once the Program is removed
because the state cache is cleared on each new frame.  Trying sticking
an default constructed osg::Program on the top of the scene
graph/viewer's Camera to force returning OpenGL back into the fixed
function pipeline.

As a general note, it is typically better to use a osg::Swtich or
similar node constructor to switch between different versions of state
that you want to use rather than adding/removing elements from the
scene graph.

Robert.

On 30 June 2014 00:43, Pierre Landes <[email protected]> wrote:
> Hi everyone,
>
> I ran into the very same problem, which seems to remain in the svn/trunk 
> branch of the project at least.
>
> Follows as attachment a small program showing the issue: it only consists of 
> a basic scene where one should be able to turn an overriding shader program 
> on and off with the up and down keys respectively.
>
> While the overriding shader does update the rendering once added, its removal 
> seems to corrupt the state graph (transform matrices are then erroneous and 
> the removed shading still active).
> I am running the OSG code from the svn/trunk, compiled with VC11 on Windows 7 
> 64bits.
>
> Is there any workaround ? Thanks in advance. :)
> Cheers!
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=60045#60045
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to