PDA

View Full Version : Funny transparency question.



PopeKetric
12-09-2002, 03:20 PM
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

Bob
12-09-2002, 03:25 PM
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.

PopeKetric
12-09-2002, 03:35 PM
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?

kjackson
12-09-2002, 03:39 PM
http://nehe.gamedev.net is a collection of GREAT tutorials. For Windows, that is.

Keith

Old GLman
12-09-2002, 04:24 PM
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