Allan Schaffer (aschaffe)
Tue, 4 Apr 1995 17:41:15 -0700
For lighting to work:
1. Lighting must be enabled: pfEnable(PFEN_LIGHTING)
2. A pfLightModel must be applied: pfApplyLModel
3. A pfMaterial must be applied: pfApplyMtl
4. One or more pfLights must be on: pfLightOn
5. Illuminated geometry must have normals: pfGSetAttr, PFGS_NORMAL3
As a quick hack test, add these calls to your pipeline initialization
callback:
pfEnable (PFEN_LIGHTING);
pfApplyMtl(pfNewMtl(pfGetSharedArena()));
pfApplyLModel(pfNewLModel(pfGetSharedArena()));
Also, take a look at fog.c, earthsky.c, simple.c, text.c, etc. in
/usr/src/Performer/src/pguide/libpf/progs; each uses a LightSource.
Allan
-- Allan Schaffer aschaffe++at++sgi.com Silicon Graphics http://reality.sgi.com/employees/aschaffe
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:10 PDT