[osg-users] StateSet issues with parent\child node

Judie judie.m.stanley at gmail.com
Tue Jul 1 10:57:05 PDT 2008


Hi,

I must be doing something wrong. I have a function that adds a sphere
map and material to a node. When I apply this function to a parent, it
also affects the child. How can I make it just affect the parent and
not the child? Also, if I call the same function with different
settings for the child, it still gets the parent's settings even if I
call the function on the child last. In the algorithm I do the
following:

find the node by name that I want to apply the state to - currNode.

make a new group node (gnode) and insert that between the currNode and
it's parent. I use this "gnode" to get or create the state. Then I add
my settings to this state. I also give it a unique name.

I have also tried just applying the state to the currNode directly and
I get the same behavior no matter what.

Judie



More information about the osg-users mailing list