Sharon Fischler (srf++at++rose)
Wed, 24 Nov 1993 16:13:48 -0800
[ ....]
->
-> Colors are set locally by pfGeoSets unless lighting is active
->and lmcolor mode is off (LMC_NULL). What you should do is
->
-> 1. enable lighting: pfEnable(PFEN_LIGHTING);
-> 2. apply a lighting model without ambient: pfApplyLModel()
-> 3. apply a material without ambient: pfApplyMtl()
-> 4. apply a black light: pfLightOn()
-> 5. disable lmcolor mode:
-> pfMtlColorMode(mtl, PFMTL_FRONT, PFMTL_CMODE_NULL);
->
->Furthermore, you should override all of the above state so they cannot
->be modified by any pfGeoStates etc:
->
-> pfOverride(PFSTATE_ENLIGHTING|PFSTATE_LMODEL etc..., 1);
->
+>---- End of excerpt from John Rohlf
It can be a little bit simpler than this using highlighting.
You can set a pfHighlight structure with black forground/background
colors on the pfGeoSets or pfGeoStates of interest.
If lighting is not enabled, your geometry will be black.
If lighting is enabled, your geometry will be black with
white specular highlights - so you may want to override lighting off, as
suggested above.
To put a highlight structure on a pfGeoSet:
pfGSetHlight(pfGeoSet* _gset, pfHighlight *_hlight);
To put a highlight structure on a pfGeoState:
pfGStateAttr(gstate, PFSTATE_HIGHLIGHT, hlight);
Highlighting can also be be enabled/disabled, overrided, and set with
pfEnable(),pfDisable(), pfOverride(), and pfApplyHlight()
If this looks interesting, see the man pages for the above, and
also the example hlcube.c
in /usr/src/Performer/src/pguide/libpr/progs/
Also, in libpfutil, there is a traversal provided that will put a
specific highlighting structure on all of the geometry under a
specified node:
pfuTravNodeHlight(pfNode *_node, pfHighlight *_hl);
srf.
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sharon Rose Fischler - Silicon Graphics, Advanced Graphics Development srf++at++sgi.com (415) 390 - 1002 MS 7L-590 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:06 PDT