COCOA: OpenGL View

I tried to render a box in OpenGL, and for some strange reason, the depth test wasn't working at all. Finally I googled the problem, and found out it was caused by the Interface Builder... this is why I avoid IB when developing...

Here's what the screen-capture looked like, even though I had enabled GL_DEPTH_TEST



basically you have to set the depth bit of the OpenGLView to be > 0 bit (which is default!?). While I was at it, I also changed the color to 32bit.

No comments: