What is the depth shift operation? How to write it in OpenGL?
what is the depth chipping and clipping test?How to write it in
Please log in or register to post a reply.
By depth shift I assume you mean depth offset. It’s provided by an
OpenGL extension called EXT_polygon_offset, which you can look up.
For depth clipping, just set the near plane and far plane to the
Alternatively you can use glDepthRange.
glDepthRange doesn’t actually *clip* depths, just rescales depths from
the [0, 1] range into the subrange you specify.
In fact, I know the functions about depth buffer in OpenGL as follows:
I don’t know how to implement the above operation with these
functions.What other functions exists?How to code?
The near and far plane are determined when you set up the projection
matrix. Probably using glOrtho, glFrustum, or gluPerspective. As for the
depth offset stuff, I already told you you’ll have to look it up
yourself, and gave you the specific search term to do so. We’re not
going to write code for you, if you want work done you’ll have to do it
Reedbeta,thanks for your reply.
I simply want to study which function can implement the depth shift
Okay, you’re not listening to me. I already told you what to search
for in my post earlier in this thread. You can find the function
I know you told me,EXT_polygon_offset.I have looked it up,but it can
not satisfy my need I think.So,I need others’ opinion.
Of course,if you have more opinions,I will thanks a lot.