Hi Paul,

The TexGenNode should work just like the LightSource. It affects all
nodes in the scene graph expect those with GL_TEXTURE_GEN_... set to
OFF. So... I've no idea, too, about how to use multiple TexGenNodes to
handle different generations in your shoes. :-)

A possible way may be to apply two TexGen attributes to nodes and
handle OpenGL's positional state issues in callbacks. But it will be
much better if we could still make use of TexGenNodes.

Cheers,

Wang Rui


2011/1/13 Paul Martz <[email protected]>:
> Hi all -- Has anyone ever successfully used multiple TexGen modes (say,
> EYE_LINEAR and OBJECT_LINEAR) on different objects in the same scene? What
> is the recommended way to do this in OSG?
>
> The TexGenNode has a pointer to a TexGen, and the TexGen has the mode. I
> assume I should create two TexGens, one OBJECT_LINEAR and one EYE_LINEAR,
> and two TexGenNodes to reference them, and add the two TexGenNodes to the
> scene graph. Then, I assume I should attach the same two TexGens as
> StateAttributes to different Node's StateSets as needed.
>
> I am running into some issues with this. If it sounds like I'm doing
> everything right, I'll post a small example that fails, or dig into the OSG
> code. More than likely, I'm doing something wrong here, so I just wanted to
> ask what the intended usage is.
>
> Thanks,
> --
>  -Paul Martz      Skew Matrix Software
>                   http://www.skew-matrix.com/
> _______________________________________________
> 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