From: MLM Veraart (veraart++at++fel.tno.nl)
Date: 12/02/2002 04:50:25
Hugh Fisher wrote:
>
> I need a way to get the Performer DRAW traversal be
> repeated for given nodes (and children) in the scene
> graph within a single frame.
>
> I have a wireframe graphics library which creates
> various geometries for wireframe displays in 'hidden
> surface' mode with backfacing polygons invisible. At
> the moment I use the pfutil draw style routines which
> replace the channel draw routine with a new one which
> disables writes to the frame buffer but not Z, calls
> pfDraw, enables writes, calls pfDraw again.
>
> Now I want to mix these wireframe objects with other
> 3D stuff (in particular filled text) within a single
> scene. And to complicate things, the scene graph is
> made up of many spatially separate subtrees, each of
> which can have both regular and wireframe nodes.
>
> Setting disjoint draw masks on the normal and wireframe
> nodes would work well if the scene graph was split at
> top between the two types. But they're not, so the
> channel draw routine would have to set the normal mask,
> call pfDraw, then do the hidden surface wireframe.
> Three traversals in total over the entire scene graph,
> which seems a bit wasteful.
>
> If I could put a draw traverser at the top of each
> wireframe subtree which returned something meaning
> "draw this node and children and then come back and
> ask me again" I'd be set.
>
> Can this be done? Anybody got any other ideas?
>
Hello Hugh,
I do not completely understand what you have tried when you speak about
3 traversals. But maybe this is a solution that you haven't tried.
Map two channels to the same window with the same scene but with different
Draw-Traversal-Masks and draw callbacks.
Don't call the pfClear in the second channel drawcallback.
Mario
This archive was generated by hypermail 2b29 : Mon Dec 02 2002 - 04:52:12 PST