AnitaKishore (kishore++at++electrogig.com)
Tue, 27 Feb 1996 13:43:51 -0800
I'ld be glad to...
If I update texture coordinates from the DRAW process, it takes
effect. The updation is as follows:
DRAW callback:
pfVec2 *texcoord = NULL;
ushort *ilist = NULL;
pfClearChan(chan);
pfDraw();
// Now update tex coord.
pfGetGSetAttrLists(*gset, PFGS_TEXCOORD2, (void **) &texcoord, &ilist);
for (int i=0; i<4; i++)
texcoord[i][0] += 0.1f; // translate along horizontal axis only
pfGSetAttr(*gset, PFGS_TEXCOORD2, PFGS_PER_VERTEX, texcoord, ilist);
The above works fine if called from DRAW. But if I call the tex coord updation
part from the APP, then no change takes palce in the tex coordinates, ie: no
translation takes place.
"*gset" has been malloced in the pf shared arena and is a global var.
Hope this makes more sense.
thanks
-anita
--------------------------------------------------------------------------
Anita Kishore
kishore++at++electrogig.com
--------------------------------------------------------------------------
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:52:27 PDT