Funny transparency question.

Why is it, or what setting do I need to change, in order to disable all transparency? It seems like what ever was the last Poly (GL_POLYGON) that I draw takes precedence, and can been seen through all the other polygons that I draw. Is there a way to stop this?

–Pope

glEnable(GL_DEPTH_TEST). And don’t forget to ask for a depth buffer also. How you do that depends on your choise of API.

Originally posted by Bob:
glEnable(GL_DEPTH_TEST). And don’t forget to ask for a depth buffer also. How you do that depends on your choise of API.

Thanks for the speedy reply. I’m using Glut. Do you happen to know of a good depthbuffer tutorial?

http://nehe.gamedev.net is a collection of GREAT tutorials. For Windows, that is.

Keith

All you have to do to request a depth buffer in glut is specify the GLUT_DEPTH constant in glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);

Old GLman