Frederic Francis (pffred++at++llogic.com)
Thu, 20 Nov 1997 12:14:29 -0500 (EST)
> A very simple question.
>
> How can i set or apply a texture on a pfGeoSet created with pfdNewSphere?
>
> Thanks in advance.
>
Ola Jorge,
I think that the default geostate associated with instances of
pfdNewSphere is the global one. So probably the best thing to do
is to give it it's own and apply a texture on that geostate:
pfGeoSet *s = pfdNewSphere(...);
pfGeoState *g = new pfGeoState;
// Attach geostate to geoset
s->setGstate(g);
// If you want to load a file from disk
pfTexture *tex = new pfTexture; tex->loadFile("mytexturefile.rgb");
// Apply texture
g->setMode(PFSTATE_ENTEXTURE, PF_ON);
g->setAttr(PFSTATE_TEXTURE, tex);
// Define texture environment
pfTexEnv *tenv = new pfTexEnv;
tenv->setMode(PFTE_DECAL); // for example
g->setAttr(PFSTATE_TEXENV, tenv);
Best Regards,
Fred.
__________________________________________________________________
Frederic Francis email: fred++at++llogic.com
Director of Technology phone: 1-514-287-1166
Lateral Logic fax: 1-514-287-3360
__________________________________________________________________
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:56:13 PDT