Re: Using PFDECAL_BASE_STENCIL?

New Message Reply Date view Thread view Subject view Author view

John Rohlf (jrohlf++at++tubes)
Tue, 25 Jul 95 9:43:16 PDT


>
> Hi all, it's me again,
>
> By default, pfLayer nodes (as loaded from a multigen model, in our case) use
> PFDECAL_BASE_DISPLACE, which uses the GL displacepolygon() function.
>
> How do I make them all use PFDECAL_BASE_STENCIL instead? The obvious thing
> to try would be:
> pfDecal(PFDECAL_BASE_STENCIL);
> pfOverride(PFSTATE_DECAL, PF_ON);
>
> But this stops Performer from ever calling pfDecal again, which means it
> won't call pfDecal(PFDECAL_LAYER) for the decal layers in each pfLayer node,
> so you end up with just lots of flickering polygons (because everything in
> the scene graph is treated as base geometry!).
>
> Do I have to traverse the whole scene graph and individually change the type
> of decaling used for each pfLayer node I come across? (Everything I want to
> do these days seems to require traversing the whole scene graph :-(. ).
>

        Traversing the whole scene graph shouldn't be so painful.
The traversal code itself would be very short and if you use
pfuTraverser the required code gets even smaller. Just register a
callback with the pfuTraverser and set the layer mode:

        pfLayerMode(layer, PFDECAL_BASE_STENCIL);

If you are using the shipped flt loader then you can explicitly
specify STENCIL-type layers with LoadFltMode().


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:51:42 PDT

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