Re: question about pfGSetAttr?

New Message Reply Date view Thread view Subject view Author view

Sharon Clay (src++at++rose.asd.sgi.com)
Tue, 24 Sep 1996 20:47:49 -0700


+>---- On Sep 24, 10:01pm, Ren-Jye Yu wrote:
> Subject: question about pfGSetAttr?
->Hi,
-> I am using Performer 2.0 on ONYX Reality Station. i have some problem
->when I use pfGSetAttr. i try to put a texture on an object. If i use NULL as my
->last argument, nonindexing, it run well. Indexing give me trouble. I can not
->see the texture. Do you have any idea what is going wrong? Following are parts
->of my code:
-> pfGeode*
-> TexSquare(char filename[])
-> {
-> pfTexture *tex;
-> pfTexEnv *tev;
-> pfGeoSet *gset;
-> pfGeode *geode;
-> pfGeoState *gstate;
-> pfVec2 *texcoords;
-> pfVec3 *coords;
->
-> ushort listcoord[]={0, 1, 2, 3};
-> ushort listtex[]={0, 1, 2, 3};
->

You have allocated your indices off the stack so when this routine
returns your data gets trashed. pfMalloc an index list or make them statics.

src.

-- 
-----{-----{---++at++   -----{----{---++at++   -----{----{---++at++   -----{----{---++at++
Sharon Rose Clay (Fischler) - Silicon Graphics, Advanced Systems Dev.
src++at++sgi.com  (415) 933 - 1002  FAX: (415) 965 - 2658  MS 8U-590
http://www.sgi.com/Technology/Performer/
-----{-----{---++at++   -----{----{---++at++   -----{----{---++at++   -----{----{---++at++
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/
            Submissions:  info-performer++at++sgi.com
        Admin. requests:  info-performer-request++at++sgi.com

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:38 PDT

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