On Tue, 05 Jun 2001 15:28:57 -0600, Brian Paul said:
> Taura M wrote:
> > On Tue, 05 Jun 2001 08:41:41 -0600, Brian Paul said:
> > > Actually, maybe there is a way using two passes and the stencil
> > > buffer.
> > >
> > > You might be able to enable polygon offset, disable depth writes
> > > and setup the stencil buffer to set a stencil bit when the depth
> > > test passes. Then, in a second pass, disable polygon offset,
> > > enable depth writes, use glDepthFunc(GL_ALWAYS) and setup a stencil
> > > test to pass wherever the stencil bit was set in the first pass.
> > >
> > > That's just off the cuff so I'm not 100% sure it meets your needs.
> > >
> > > -Brian
> > >
> > Oh my, it sounds too cpu intensive too. The sitation I have is very
> > performance critical. I was hoping there was a quicker way to achieve
> > it.
> > But again, this is a pretty high priority feature that we need.
> If you've got hardware stencil it might work fine. I don't know
> anything about your application though.
It's still rather clumbersome to render two passes, this feature seems
rather elementary (to be able to pick which depth value is written)
instead of GL's requirement of using the offsetted depth value.
Would there be any way to add a set of Mesa3D specific `features'
to achieve this? Even with hardware stencil buffering it will be
incredibly slow. This involves drawing a heightfield (bunch of triangles)
over a predrawn 2D scene which contains many other 3D objects.
Sincerely, ,"-_ \|/
-Capt. Taura M. , O=__ --X--
.__ ,_JNMNNEO=_ /|\
OOUUUIEEIOONNOIUbe. "7OMMMMNNNNNWWEEEEOOOOOO" "'.
EEBNNMMMNWNWWEEIMMNe. __ 7EMMMNNNNNWWWEEEEEEEOO. " .
NNMMMMWWWMMMWEINMMMNn "=BBEEEEMMMMMMMMNNNWWWEEOOOOO=._ .