From: Jason Daly (jdaly++at++ist.ucf.edu)
Date: 05/23/2005 07:53:30
Devrim Erdem wrote:
> If you want to change the current OpenGL fog state for each object, I
> guess it would be sufficient to install a pre and post draw callback
> and change and restore the fog as you wish in these functions. If this
> is what you mean.
>
> But I am not sure if you could assign an individual pfFog to certain
> nodes, didn't try before. Can be possible...
>
You should be able to use multiple pfFog objects. Just create as many
pfFog objects as you need, create that many pfGeoStates, set the
attribue and modes of the fog object on the geostate (see man pfFog for
an example of this), and assign each of the geostates to the appropriate
geoset (geoset->setGState). If your objects are composed of multiple
geosets, you may need to write a recursive function to make all the calls.
Devrim's solution will work as well, if you'd rather do the setting of
the fog at the pfGroup level. The per-geoset method has the advantage
of allowing Performer to do state sorting, so it can potentially run faster.
----"J"
"I'm a castaway stranded in a desolate land, I can see the footprints in the virtual sand." --Neil Peart
This archive was generated by hypermail 2b29 : Mon May 23 2005 - 07:58:21 PDT