From: Frank Hasenbrink (hasenbrink++at++vertigo-systems.de)
Date: 02/12/2001 07:54:45
Hi, I'm using a drawbin to globaly highlight parts of the scene graph,
while others are left untouched. Everything outside my drawbin is dimmed
down, everything inside is rendered by its original intensity. To do
this I implemented 2 methods using blending and the accumulation buffer.
Both are implemnted in OpenGL and need a sorting of the drawn geometry
(therefore I use the drawbin) in highlighted and not highlighted
objects, with the not highlighted objects drawn first. The blending
method just blends everything outside my drawbin with a constant color.
The accumulation buffer method scales the drawbuffer by transfering to
and from the accumulation buffer when entering my drawbin.
Now 3 Questions:
1. Is there any possibility to get called when my drawbin is actualy
rendered? I can't render the bins manualy. Currently I add traversal
callbacks to all the highlighted geometry and check for the first draw
callback in each frame.
2. The blending method does not work, when culling has to rearrange the
geometry to fit the bin ordering. Everything is rendered in its original
intensity. When the scene graph represents the bin order, it works fine.
Here comes a sketch of my blending implementation:
localPreDraw {
...
glEnable (GL_BLEND);
glBlendColor (scale, scale, scale, 0);
glBlendFunc (GL_CONSTANT_COLOR, GL_ZERO);
}
enterMyDrawBinCB {
glDisable (GL_BLEND);
}
3. Is there any other possibility to globaly scale the intensity of
parts of a scene without knowing anything about it?
Thanks for any help,
Frank
This archive was generated by hypermail 2b29 : Mon Feb 12 2001 - 07:54:57 PST