From: Surakle++at++gmx.de
Date: 08/06/2001 06:36:40
Hi,
I already posted this but got no answer! Maybe now somebody can help ???
> Hi Performers,
>
> I'm trying to apply a texture to a pfGeoSet using a pfGeoState.
> It seems that I missed to set something but I have no idea what !
>
> Here is the code:
>
> pfTexture *pftexture = new pfTexture();
> if(texArray != NULL)
> gsetNode->setAttr(PFGS_TEXCOORD2, PFGS_PER_VERTEX,
> vrmlMemDup(texArray,
>
> sizeof(texArray)), NULL);
>
> pftexture->loadFile(filename);
> pfTexEnv *tEnv = new pfTexEnv();
> geoState->setAttr(PFSTATE_TEXENV, tEnv);
> pftexture->setRepeat(PFTEX_WRAP_S,PFTEX_REPEAT);
> pftexture->setRepeat(PFTEX_WRAP_T, PFTEX_REPEAT);
> geoState->setAttr(PFSTATE_TEXTURE, pftexture);
> geoState->setMode(PFSTATE_ENTEXTURE, PF_ON);
>
> gsetNode->setGState(geoState);
>
> So does anybody have an idea what is missing ???
>
> Thx !
>
-- Aufgepasst - jetzt viele 1&1 New WebHosting Pakete ohne Einrichtungsgebuehr + 1 Monat Grundgebuehrbefreiung! http://puretec.de/index.html?ac=OM.PU.PU003K00736T0492a
This archive was generated by hypermail 2b29 : Mon Aug 06 2001 - 06:36:37 PDT