Then I used many other Polygons and quads to make this into a 3D object. My question is, how do I make it so the sides of this object that are not in the field of view of the camera don’t show up? Right now, it is a very complex picture, that is hard to understand what is going on, because the backside of the 3D object show up just like the front. But when I use the glutSolidCube(3.0f) command, it looks like it should, but the cube is not the shape that I need. Is there some sort of trick with lighting that I can use? Thanks for any help, Newbie
I am not sure what you mean by if my model is convex. I inserted the lines that you listed above and nothing changed. Does convex pertain to which direction I drew my vertexes? Either clockwise or counterclockwise? For I drew everything in a counterclockwise direction. Thanks for the help. Newbie
Depth-test IS relevant if the model isn’t convex, i.e. if some front-facing polys should appear behind other front-facing polys. Culling on its own isn’t enough here.
In my program I enable depth testing by the following code:
glEnable (GL_DEPTH_TEST);
And when I do this, the screen stays totally black. But when I comment it out, my complex shape and my cylinder both appear. Do I need to do something else besides the enable to make this work? I also have Lighting, Lighto and Cull_Face enabled.
May I ask what a convex shape is though? Does it have to do with the counterclockwise means of defining my shapes? And what is the difference between Cull_Face and Depth_Test?