Sign in to follow this  
Decrius

Last drawn is on top

Recommended Posts

Pretty straightforward, but I've seen examples that didn't have it: I draw a box with on eachside a texture, I rotate it and then it happens: the last drawn face is always shown ontop of faces that are closer to the camera. How to prevent this? Thanks.

Share this post


Link to post
Share on other sites
You have to enable Z buffering ( depth test ), i think the command is gl_Enable(GL_DEPTH_TEST)

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