I’ve got a problem that I’ve been struggling with for quite some time. For some reason, the depth buffer isn’t working in my program. It only draws the triangles if I have the depth function set to GL_EQUAL (or one of it’s derivatives). The OpenGL initialization code is pretty much exactly like some other projects I did, just changed to work in C++ instead of C. I’ve had a few people look at it, but none of them have been able to find the problem yet.
I’d be very grateful if someone would take a look at the rendering code
Rendering code + screenshot of output: http://www.geocities.com/SiliconValley/Lakes/1561/stuff.zip