From: Markus Som (markussom++at++gmx.at)
Date: 10/24/2000 03:09:52
Hi! I've some problems with Performer.
I try to make a Geoset with a color for each prim, i set the normals and
the smooth shading on. But the smooth shading does not work!
What am i doing wrong. Does anyone have a short example ia to draw to
polygons with this smooth shading?
Second Question. Is there any standard function to calculate the normats
if i have the vertex!
thanks
markus
Here a code fragment:
gset->setPrimType(PFGS_POLYS);
...
gset->setPrimLengths(lengths);
verts = (pfVec3 *) pfMalloc(vertscnt* sizeof(pfVec3),
pfGetSharedArena());
norms = (pfVec3 *) pfMalloc(vertscnt* sizeof(pfVec3),
pfGetSharedArena());
color = (pfVec4 *) pfMalloc(vertscnt* sizeof(pfVec4),
pfGetSharedArena());
...
verts[n]=...
norms[n]=...
color[n]=...
...
gset->setAttr(PFGS_COORD3, PFGS_PER_VERTEX, verts, NULL);
gset->setAttr(PFGS_NORMAL3, PFGS_PER_VERTEX, norms, NULL);
gset->setAttr(PFGS_COLOR4, PFGS_PER_VERTEX, color, NULL);
gstate= new pfGeoState;
gstate->setMode(PFSTATE_SHADEMODEL,PFSM_GOURAUD);
gset->setGState(gstate);
-- Sent through GMX FreeMail - http://www.gmx.net
This archive was generated by hypermail 2b29 : Tue Oct 24 2000 - 03:10:07 PDT