Angus Dorbie (angus++at++division.demon.co.uk)
Fri, 10 Mar 1995 16:15:54 +0000
At first it seems that you might be able to set the transparency state on and
then override that state using pre and post draw callbacks. Unfortunately this
doesn't work because the model has no alpha information. One approach would be
to model the object with transparency and override it to PFTR_OFF when you
don't need it. This has the advantage that you don't have to worry about the
models position in the scene graph because without callbacks it will be sorted.
Unfortunately this doesn't allow you to vary the alpha value. Another method is
to apply a transparent material in pre draw then override the material on. You
must also apply and override pfTransparency(PFTR_ON) and start worrying about
the objects position in the scene graph unless you use screendoor transparency.
If you use the second method you can vary the degree of transparency of an
object by calling pfMtlAlpha(). In order for alpha transparency to work on a
particular material material you must call:
pfMtlColorMode(mat, PFMTL_BOTH, PFMTL_CMODE_COLOR);
Good Luck.
-- Angus Dorbie Division Ltd, Software Engineer 19 Apex Court, Tel: (01454)615554 Woodlands, Fax: (01454)615532 Bristol BS12 4JT, angus++at++division.demon.co.uk UK
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:03 PDT