Re: Shading

New Message Reply Date view Thread view Subject view Author view

From: Don Burns (don_burns++at++peru.engr.sgi.com)
Date: 10/24/2000 09:23:13


Your code looks right. What is your lighting state? Try turning lighting on
and off and see what happens.

-don

On Oct 24, 12:09pm, Markus Som wrote:
> Subject: Shading
> 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
>
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
>-- End of excerpt from Markus Som


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Oct 24 2000 - 09:24:10 PDT

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