[osg-users] Clear depth buffer
Pecoraro, Alexander N
alexander.n.pecoraro at lmco.com
Thu Jul 26 18:24:02 PDT 2007
I was wondering if anyone could offer me a suggestion on how to force a
clear of the depth buffer in the middle of a rendering pass. I have a 3d
model that I want to show up right in front of the viewer and always be
on top. I used a absolute reference frame transform node and an
orthographic projection node to put the model in the middle of the
screen, but now when my viewer gets too close to other models they peek
through. I figure if right before I draw my orthographic model I clear
the depth buffer then I would guarentee that nothing would get draw on
top of my model (as long as I draw my model last). I found that I can't
just disable depth testing on the model because then the various pieces
of the model don't get drawn in the right order and so certain pieces
end up on top of pieces that they shouldn't end up on top of.
Any help?
Thanks.
Alex
More information about the osg-users
mailing list