Re: pfLightSource in projtex mode

New Message Reply Date view Thread view Subject view Author view

From: Brian Furtaw (brian++at++sgi.com)
Date: 06/13/2001 04:08:54


Stephane,

If you look at Lawrence's email he describes a way to install draw
callbacks for the node you are interested in. By doing this you could
the texture being used.

In the preDraw callback:

pfTexture *desired_texture;
pfTexEnv *desired_tev;

pfPushState();
pfOverride(PFSTATE_TEXTURE | PFSTATE_ENTEXTURE | PFSTATE_TEXENV,
PF_OFF);
pfEnable(PFSTATE_ENTEXTURE, PF_ON);

desired_texture->apply();
// May have to use decal env this texture will get applied
// more then once.
desired_tev->apply();

pfOverride(PFSTATE_TEXTURE | PFSTATE_ENTEXTURE | PFSTATE_TEXENV, PF_ON);

In the postDraw callback:

pfPopState();

Give it a try.

Brian

Stephane Jaeger wrote:
>
> I am affraid I ve not been very clear. Actually you re right, I d like my
> node to be textured by its own texture, without being modified by the
> projected texture. If anybody knows ? ..
> Thank you anyway,
> Bye
> Stephane
> Brian Furtaw wrote:
>
> > I don't suppose you could turn off textures for that node. That would
> > solve your problem.
> >
> > Brian
> >
> > Stephane Jaeger wrote:
> > >
> > > Hi all,
> > > the deadline is coming soon for me and there is one last thing I 'am
> > > stuck on. I would be most grateful if someone could answer to this:
> > > I am using a pfLightSource in projTex mode ( projective texture ) . All
> > > is working fine, but there is one node in my
> > > scene graph that I don t want to be affected by the projected texture.
> > > Does anybody know how I could do that.
> > > Thank you all for your help,
> > > Bye
> > > Stephane
> > >
> > > -----------------------------------------------------------------------
> > > List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> > > Open Development Project: http://oss.sgi.com/projects/performer/
> > > Submissions: info-performer++at++sgi.com
> > > Admin. requests: info-performer-request++at++sgi.com
> >
> > --
> > ----oOOo---- ----oOOo---- ----oOOo---- ----oOOo----
> >
> > Brian Furtaw (brian++at++sgi.com)
> > Graphics Guru Office:(301)572-3293 Fax: (253)323-8182
> > 12200-G Plum Orchard Drive OpenGL/Performer/OpenInventor/ImageVision
> > Silver Spring, Maryland 20904 Volumizer/Optimizer/React/PCI Device
> > Drivers
> > -----------------------------------------------------------------------
> > List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> > Open Development Project: http://oss.sgi.com/projects/performer/
> > Submissions: info-performer++at++sgi.com
> > Admin. requests: info-performer-request++at++sgi.com

-- 
    ----oOOo----    ----oOOo----    ----oOOo----    ----oOOo----

Brian Furtaw (brian++at++sgi.com) Graphics Guru Office:(301)572-3293 Fax: (253)323-8182 12200-G Plum Orchard Drive OpenGL/Performer/OpenInventor/ImageVision Silver Spring, Maryland 20904 Volumizer/Optimizer/React/PCI Device Drivers


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Jun 13 2001 - 04:14:26 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.