Hi Robert,

I had to add in some buffer group nodes ahead of the ones I wanted to
apply a state change to and so now it works great.

Thanks,

Judie

On Apr 14, 11:54 am, "Robert Osfield" <[EMAIL PROTECTED]>
wrote:
> Hi Judia,
>
> What you are trying to do should work, but without the code for setting the
> different stateset to the appropriate nodes I can't say what exactly the
> problem is.  The fact that you refer to NodeCParent  looks suspect, you
> should apply directly to NodeC as NodeCParent is NodeA...
>
> Robert.
>
> On Mon, Apr 14, 2008 at 7:36 PM, Judie Stanley <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > This is an exisiting project.
> > Here is the basic node structure:
>
> >                     Root
> >                        |
> >                     NodeA
> >                      /       \
> >              NodeB     NodeC
>
> > I want to disable writes to the color buffer before Node A, and then I
> > don't want to enable them until Node C. That way, Node A, and Node B are
> > drawn but only the depth buffer is updated, but then when Node C is drawn,
> > both the color buffer and the depth buffer are updated.
>
> > Here is my code:
>
> > osg::ColorMask *colormaskOff = new osg::ColorMask(false, false, false,
> > false);
> > osg::ColorMask *colormaskON = new osg::ColorMask(true, true, true, true);
>
> > osg::StateSet* state = NodeAParent->getOrCreateStateSet();
> > state->setAttribute(colormaskOff);
>
> >  osg::StateSet* state2 = NodeCParent->getOrCreateStateSet();
> > state2->setAttribute(colormaskON);
>
> > So you can see my dilema.
>
> > In the code I see that the glColorMask gets called with the correct data,
> > however, because of the graph topology, NodeA and NodeB get drawn to the
> > color buffer even though I disabled it in the Root (NodeAParent), it gets
> > enabled for NodeA (NodeCParent).
>
> > Is it possible to stick come kind of node inbetween NodeA and NodeC? What
> > type of node should that be? Can there be a blank node?
>
> > Thanks,
>
> > Judie
>
> > _______________________________________________
> > osg-users mailing list
> > [EMAIL PROTECTED]
> >http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph...
>
>
>
> _______________________________________________
> osg-users mailing list
> [EMAIL 
> PROTECTED]://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph...-
>  Hide quoted text -
>
> - Show quoted text -
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to