I have written a program that converts Bevier patches into 3-d GL_POLYGON objects (eg. 32 Bezier patches to draw a teapot which is comprised of a few thousand triangles).
Unfortunately the patches that are drawn last appear in front of the rest. This makes some interior sections of my teapot appear when they're supposed to be hidden.
Is there some automatic way to hide triangles which should not be shown? If not, what's the easiest way to do so that's not absurdly inefficient?
Thanks for the help!