Re: transparency

New Message Reply Date view Thread view Subject view Author view

Angus Dorbie (angus++at++division.demon.co.uk)
Mon, 23 Jan 1995 09:59:49 +0000


On Jan 20, 4:04pm, Lance R. Marrou wrote:
> Subject: transparency
> I get a different result from using this:
>
> pfGStateMode( exp_gstate, PFSTATE_TRANSPARENCY,
> PFTR_ON|PFTR_NO_OCCLUDE );
>
> as opposed to:
>
> long exp_trans_state;
> long PreDraw(pfTraverser *trav, void *data)
> {
> exp_trans_state = pfGetTransparency();
> pfTransparency(PFTR_ON|PFTR_NO_OCCLUDE);
> return PFTRAV_CONT;
> }
>
> long PostDraw(pfTraverser *trav, void *data)
> {
> pfTransparency(exp_trans_state);
> return PFTRAV_CONT;
> }
>
> The pre-draw and post-draw function callback technique provides
> the correct transparent geoset (of course the alpha values are
> set correctly). However, setting the state mode works for
> allowing transparency, but it makes the geoset occlude other
> transparent geometry. I have attempted just about every combination
> of state mode to get it to work the same, but no luck. Obviously,
> I could just stick to the function callbacks, but I want to know
> why setting the state doesn't work.
>
> I have images which show the results of both methods for those
> interested to see them.
>

>
>-- End of excerpt from Lance R. Marrou

Hi Lance,
        your problem may be that when you set the geostate transparency on
performer sorts associated geometry but when you simply add callbacks performer
cannot know what youre doing in there and so doesn't sort. The apparent result
is very different because of the drawing order, although geometry is still
being drawn in exactly the same way.

-- 
 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

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:53 PDT

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