From: Jim Canon (jcanon++at++yaw.org)
Date: 08/04/2003 06:34:49
Hello Yair,
Below is a copy of the code I am using for the texture mapping.
/* SNIP
/* Texture mapping */
texture = new pfTexture;
texture->setFilter(PFTEX_MINFILTER, PFTEX_MIPMAP_TRILINEAR);
texture->setFilter(PFTEX_MAGFILTER, PFTEX_BILINEAR);
texture->setRepeat(PFTEX_WRAP_S, PFTEX_CLAMP);
texture->setRepeat(PFTEX_WRAP_T, PFTEX_CLAMP);
if (!texture->loadFile("sand.rgb")) {
pfNotify(PFNFY_FATAL, PFNFY_PRINT, "Failed to load texture");
}
tgen = new pfTexGen;
tgen->setMode(PF_S, PFTG_OBJECT_LINEAR);
tgen->setMode(PF_T, PFTG_OBJECT_LINEAR);
tgen->setPlane(PF_S, 0.5f, 0.0f, 0.0f, 0.5f);
tgen->setPlane(PF_T, 0.0f, 0.5f, 0.0f, 0.5f);
geostate = new pfGeoState;
geostate->setMode(PFSTATE_ENTEXTURE, PF_ON);
geostate->setMode(PFSTATE_ENTEXGEN, PF_ON);
geostate->setMode(PFSTATE_TRANSPARENCY, PFTR_OFF);
geostate->setAttr(PFSTATE_TEXGEN, tgen);
geostate->setAttr(PFSTATE_TEXTURE, texture);
/* Apply texture */
blacksquareGS->setGState(geostate);
blacksquareNode->addGSet(blacksquareGS);
END */
Does everything appear correct here?
-Jim
-- Jim Canon Engineering Research Scientist West Virginia Virtual Environments Laboratory West Virginia University (304) 293-7535 x4129 http://wvvel.csee.wvu.edu/---------- Original Message ----------- From: "Jim" <jcanon++at++yaw.org> To: "Jim" <jcanon++at++yaw.org> Sent: Sun, 3 Aug 2003 15:44:57 -0400 Subject: Fw: [info-performer] Loading Textures
> ----- Original Message ----- > From: "Yair Kurzion" <yair++at++polygon.engr.sgi.com> > To: "Jim Canon" <jcanon++at++yaw.org> > Cc: "Performer Mailing List" <info-performer++at++sgi.com> > Sent: Friday, August 01, 2003 9:57 PM > Subject: Re: [info-performer] Loading Textures > > > > > Hi Jim ! > > > > Sounds like one of two problems: > > > > o You have a pfGeoSet without a pfGeoState. Such pfGeoSets render > themselves > > without changing the OpenGL state (so they can inherit any arbitrary > state). > > > > o You have a pfGeoSet with a pfGeoState that has texture enabled but no > > pfTexture set. I believe this case will also inherit the currently-bound > > texture. > > > > -yair > > > > > When using textures in a scene, I only see a "Powered by OpenGL > Performer" > > > logo where the texture should be. I noticed that on the web site it is > > > indicated that the "Powered by OpenGL Performer" logo is overlayed on > each > > > frame in the free version, but I didn't see anything about it limiting > > > texture usage. > > > > > > Is this a limitation with the free version of Performer, or does it > indicate > > > a problem loading the texture? > > > > > > Thanks! > > > -Jim > > > > > > > > > -- > > > Jim Canon > > > Engineering Research Scientist > > > West Virginia Virtual Environments Laboratory > > > West Virginia University > > > (304) 293-7535 x4129 > > > http://wvvel.csee.wvu.edu/ > > > > > > ----------------------------------------------------------------------- > > > List Archives, Info, FAQ: 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 > > > ----------------------------------------------------------------------- > > > SIGGRAPH 2003 Friends of Performer Meeting: > > > Wednesday July 30 6:00pm San Diego Hilton Hotel Santa Rosa Room > > > ----------------------------------------------------------------------- > > > > > > > > > -- > > \_________ \_____ \__ \__ \_____ > > \_________ \_____ \__ \__ \_____ Yair Kurzion > > \__ \__ \____\__ \__ yair++at++sgi.com > > \__ \__ \__ (650) 933-6502 > > \__ \__ \__ > > \__ \__ \__ > > > > ----------------------------------------------------------------------- > > List Archives, Info, FAQ: 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 > > ----------------------------------------------------------------------- > > > > > > ------- End of Original Message -------
This archive was generated by hypermail 2b29 : Mon Aug 04 2003 - 05:36:31 PDT