An urgent question about texture mapping

Started by
5 comments, last by kburkhart84 18 years, 4 months ago
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 glDisabl (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?
Advertisement
I'm not sure why you would want to disable depth testing during texture mapping, but what is happening makes perfect sense. Those results should be expected.

If you still want to disable depth testing, _and_ ensure the underlying polygons are not visible, you will need to depth sort each polygon individually and render from back to front.
Quote:Original post by bpoint
I'm not sure why you would want to disable depth testing during texture mapping, but what is happening makes perfect sense. Those results should be expected.

If you still want to disable depth testing, _and_ ensure the underlying polygons are not visible, you will need to depth sort each polygon individually and render from back to front.


Exactly why do you disable depth test in the first place?? Textures triangles are like any triangles in that sense. Unless you have something special going on, don't ever disable the depth buffer.


Quote:Original post by kburkhart84Exactly why do you disable depth test in the first place?? Textures triangles are like any triangles in that sense. Unless you have something special going on, don't ever disable the depth buffer.

Don't quote me! I didn't ask the question! :D
But only if I disable the depth test, the texture on the polygon could be seen.
You can try it self.
I think what you're trying to say that you needed to disable depth testing in order to have your texture be rendered properly.

If that is the case, then you're doing something wrong. Disabling depth testing is not required to perform texturing. Please post some code and I might be able to help.
Quote:Original post by bpoint
Quote:Original post by kburkhart84Exactly why do you disable depth test in the first place?? Textures triangles are like any triangles in that sense. Unless you have something special going on, don't ever disable the depth buffer.

Don't quote me! I didn't ask the question! :D


I know you didn't ask the question, rather I was citing your post and using mine to confirm it.


This topic is closed to new replies.

Advertisement