pfSceneGState

New Message Reply Date view Thread view Subject view Author view

Stephane GUILLAUDEUX (guio++at++gesma.gesma.fr)
Tue, 28 Oct 1997 10:11:26 GMT


Hi,
I am trying to apply global texture on object with perfly but i obtain only
the texture environment (green color specified with pfTEnvBlendColor)
and i have not the real texture (brick.rgba).
Texture is applying with
        pfSceneGState(scene, gstate);

and gstate is initializing with the following instructions
Did I miss something ?
Thanks for help.

    arena = pfGetSharedArena();
    tex = pfNewTex (arena);
    gstate = pfNewGState (arena);
    pfEnable(PFEN_TEXTURE);

    if (pfLoadTexFile (tex,"brick.rgba"))
    {
        uint *i;
        int nc, sx, sy, sz;
        pfGetTexImage(tex, &i, &nc, &sx, &sy, &sz);

        pfGStateAttr (gstate, PFSTATE_TEXTURE, tex);
        pfGStateMode (gstate, PFSTATE_ENTEXTURE, 1);
        pfGStateMode (gstate, PFSTATE_ENLIGHTING, 0);
        pfGStateMode (gstate, PFSTATE_CULLFACE, PFCF_OFF);
        /*pfGStateMode(gstate,PFSTATE_ENTEXGEN,1);*/
        tev = pfNewTEnv (arena);

        pfTEnvMode(tev, PFTE_BLEND);
        pfTEnvBlendColor(tev, 0.0f, 1.0f, 0.0f, 1.0f);
        pfGStateAttr (gstate, PFSTATE_TEXENV, tev);
   }
=======================================================================
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:56:08 PDT

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