Depth Buffer Question

I’m working with an example that was provided in a cocoa programming book. The example subclasses a NSOpenGLView and renders a couple of doughnut shapes and a cone. The problem I’m having is that the shapes appear to be rendering inside out. All of the front faces are getting culled and the backfaces are getting shaded.

I wonder if there could be a problem with the normals that are generated for the shapes. But since I use the GLUT to generate the shapes I don’t have access to the normals themselves.

Has anyone experienced this problem before? I’m running on a Rev A Powerbook 12in with a Geforce 4 Go 420 GPU. Any help is greatly appreciated.

It could be due to the way the geometry is wound. Check the glutSolidTeapot manpage for a discussion of how to flip the face culling around.

It could also be depth buffer related-- you don’t have one, or depth testing isn’t enabled. If that’s the case, the front or back faces will be visible depending on the orientation of the model. If the front faces are always culled then it is probably the winding order.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.