Hi Wojtek,

You've come across the wacky world of position OpenGL state.  Normal
OpenGL state like modes and textures etc are invarient of the current
modelview matrix, not so for positional state these use the current
modelview matrix to position themselves so its become crucial that you
apply a specific modelview matrix before you apply the state otherwise
it's position will vary widely according to what modelview matrices
just so happens to be applied.

Examples of positional state are glLight, glClipPlane and glTexGen
EYE_LINEAR.  glTexGen OBJECT_LINEAR is not positional though so it
doesn't matter when its applied - its just like ordinary OpenGL state.
 So how does the scene graph handle this positional state?  We have to
anchor in space using a special node, osg::LightSource, osg::ClipLane
and osg::TexGenNode all exist for this purpose.

Robert.

On Thu, Mar 27, 2008 at 9:16 AM, Wojciech Lewandowski
<[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> Whats the difference in coord generation (in practice) between TexGenNode
> and Group with TexGen attribute. Suppose I have the same subgraph attached
> to either such TexGenNode or such Group with TexGen. In both cases TexGens
> are eye linear and use the same texture stage.
>
> I expected them to produce the same tex coords but results different. So I
> am bit puzzled. What did I miss ?
>
> Cheers,
> Wojtek Lewandowski
> _______________________________________________
>  osg-users mailing list
>  osg-users@lists.openscenegraph.org
>  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to