Sign in to follow this  
sun_1997

An urgent question about texture mapping, help!!!

Recommended Posts

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?

Share this post


Link to post
Share on other sites
I'm not sure exactly what you need to do, and it might help to see some code, or at least a detailed explanation of exactly what you're drawing in between mode changes.

I think I might know what's happening though. Just keep in mind that after you disable depth testing, everything you render will be on top of whatever you've already rendered, since it won't check to see if it's behind something.

Besides that, I'm not sure what you're trying to do without more information. Sorry.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this