PDA

View Full Version : An urgent question about texture mapping, help!!!



Sun Gang
11-23-2005, 06:23 PM
Hi,everyone:
In my OpenGL application, I used GL_GREATER option for depth test. When I was processing texture mapping, I turned off the depth test by invoking glDisable(GL_DEPTH_TEST). After finishing
texture mapping, I reopened depth test. Now the problem came, the inner texture could be seen
outside the object, and the back texture was covered in front of the front one if the front
one was mapped earlier than the back one. How can I solve this problem but not to change the
GL_GREATER option for the depth test?

jide
11-24-2005, 03:18 AM
I don't understand what you mean. Generally, texturing doesn't involve the depth buffer: it's just a fragment coloring.

honeyhuang
11-27-2005, 10:32 PM
"glDisable(GL_DEPTH_TEST)" makes every Graphic Unit drawed on the screen in the order you write the corresponding code. So you got the result surprised.
If you delete the code line , every thing will be ok.