abc9804 at October 17th, 2007 23:51 — #1
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 OpenGL?
reedbeta at October 18th, 2007 00:18 — #2
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 appropriate distances.
sol_hsa at October 18th, 2007 03:53 — #3
Alternatively you can use glDepthRange.
reedbeta at October 18th, 2007 12:25 — #4
glDepthRange doesn't actually *clip* depths, just rescales depths from the [0, 1] range into the subrange you specify.
abc9804 at October 18th, 2007 22:02 — #5
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?
reedbeta at October 19th, 2007 12:40 — #6
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 yourself.
abc9804 at October 22nd, 2007 05:51 — #7
Reedbeta,thanks for your reply.
I simply want to study which function can implement the depth shift operation?
reedbeta at October 22nd, 2007 13:34 — #8
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 yourself easily.
abc9804 at October 22nd, 2007 22:04 — #9
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.