Hi Robert,

How would you feel if the TexGen class was responsible for setting its
own ModelView matrix before calls to glTexGen when in EYE_LINEAR mode?

The changes would be:
- TexGen would have a new RefMatrix member that is used in apply with
EYE_LINEAR.
- TexGenNode would set the matrix during cull traversal, instead of
adding itself to the RenderStage's list of PositionalState objects.

This way the texgen can act on local subgraphs in eye_linear when the
user specifies a modelview matrix, while preserving existing
functionality which is useful for projected texturing.

Chase


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:osg-users-
> [EMAIL PROTECTED] On Behalf Of Robert Osfield
> Sent: Tuesday, August 07, 2007 12:13 PM
> To: [email protected]
> Subject: Re: [osg-users] Texture units and TexGen
> 
> Hi Chase,
> 
> On 8/7/07, Bradford, Chase <[EMAIL PROTECTED]> wrote:
> > Can TexGens and TexGenNodes reuse texture units?  My scene graph is
> setup
> > with many distinct elements that need individual texture coordinate
> > generation, but if I try to reuse a texture unit, texgen fails.
> 
> Positional TexGen does not support localization to subgraphs, rather
> affects the whole RenderingStage that encloses it.  Positional TexGen
> is EYE_LINEAR, and depends upon the modelview matrix at application,
> and the TexGenNode provides it withe fixed position in space i.e. its
> unique modelview matrix.
> 
> If you create RenderStage for each subgraph then you could do what you
> are after.
> 
> Robert.
> _______________________________________________
> osg-users mailing list
> [email protected]
>
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to