Marcus (giraffe.asd.sgi.com!sgi.sgi.com!uunet.uu.net!multigen!Marcus)
Mon, 14 Aug 1995 18:12:20 PST
<snip>
>Anyways, I got the pre- and post- draw callback
>method to work finally, following another suggestion of
>Mark Visconti. I added the line:
>
> pfMtlColorMode((pfMaterial *)data, PFMTL_FRONT,
> PFMTL_CMODE_COLOR);
>
>into the pre- callback.
>
>I'm a bit puzzled why I had to specify PFMTL_CMODE_COLOR
>instead of something like PFMTL_CMODE_AD, because of this
>blurb from the
<snip>
In PFMTL_CMODE_AD mode the color comes only from the geoset
colors. The loader actually blends the material diffuse component
with the polygon/vertex color when building geosets in this mode.
Changing ambient and/or diffuse material components in this
mode really requires that you change the geoset colors!
In PFMTL_CMODE_COLOR the color (for lit geometry) comes only
from the material. That's why this mode works for your example,
since you're only changing the material components.
The difference in performance is between the lmcolor vs. lmbind
IRISGL calls when applying the materials. PFMTL_CMODE_AD is
generally considered the faster mode.
Regards,
Marcus Barnes, Member Technical Staff
MultiGen Inc., 550 S. Winchester Blvd. Suite 500, San Jose CA, 95128
PH: 1-408-556-2654 FX: 1-408-261-4102
EMAIL: multigen!marcus++at++uunet.UU.NET
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:47 PDT