Judie wrote on Tuesday, April 15, 2008 5:17 PM:
> Because in the osg implementation (that I have anyway), it looks like
> the parent of the node is used for setting the state. This seems to be
> true in my experimenting. If I just applied the state change to the
> node I wanted affected by the state change, it did not seem to work.
> 
> void RenderLeaf::render(State& state,RenderLeaf* previous)

Ah, I thought you were talking about osg::StateSets being applied to 
osg::Nodes, rather than osg::RenderLeaf, osg::StateGraph and osg::State. That's 
a big difference!

Since you've got it working, I'll leave you alone, then :)

> On Apr 15, 3:07 pm, "Thrall, Bryan" <[EMAIL PROTECTED]>
> wrote:
>> Judie wrote on Tuesday, April 15, 2008 4:58 PM:
>> 
>>> 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.
>> 
>> Out of curiosity, why couldn't you just add the state change to
>> NodeC instead of adding buffer group nodes? 
>> 
>> 
>> 
>> 
>> 
>>> On Apr 14, 11:54 am, "Robert Osfield" <[EMAIL PROTECTED]>
>>> wrote:
>>>> 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... 
>> 
>>>> 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.

-- 
Bryan Thrall
FlightSafety International
[EMAIL PROTECTED]
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to