[osg-users] Texture units and TexGen
Bradford, Chase
CHASE.BRADFORD at saic.com
Tue Aug 7 13:18:42 PDT 2007
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: osg-users-bounces at lists.openscenegraph.org [mailto:osg-users-
> bounces at lists.openscenegraph.org] On Behalf Of Robert Osfield
> Sent: Tuesday, August 07, 2007 12:13 PM
> To: osg-users at lists.openscenegraph.org
> Subject: Re: [osg-users] Texture units and TexGen
>
> Hi Chase,
>
> On 8/7/07, Bradford, Chase <CHASE.BRADFORD at saic.com> 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
> osg-users at lists.openscenegraph.org
>
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
More information about the osg-users
mailing list