question about pfGSetAttr?

New Message Reply Date view Thread view Subject view Author view

Ren-Jye Yu (renjye++at++python.tamu.edu)
Tue, 24 Sep 1996 22:01:40 -0700


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};

                ##########################

                pfGSetAttr(gset, PFGS_COORD3, PFGS_PER_VERTEX, coords,
listcoord);
                    pfGSetAttr(gset, PFGS_TEXCOORD2, PFGS_PER_VERTEX, texcoords,
listtex);

                ##########################

                pfGSetGState(gset, gstate);
                    pfAddGSet(geode, gset);

                    return geode;
        }

        Thanks.

-- 
Ren-Jye Yu and Drew Robbins
Graduate Student
Department of Aerospace Engineering
Texas A&M University 
College Station 77843
phone(O) : (409) 845-0729
phone(H) : (409) 691-8570
e-mail : renjye++at++python.tamu.edu
=======================================================================
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.