glClipPlane() yes, but is there such a thing as glClipSphere() ?
Using identical Bézier patches (hyperbolic paraboloids) with 12 distinct orientations, I have constructed a continuous three-dimensional surface. It is symmetrical outwards from a central point. I can take sections of the object using clipping planes, but I need to examine the structure by cutting away everything exterior to a given sphere. In other words, I would like to examine its appearance interior to and bounded by a sphere.
Hence my question, is there such a thing in OpenGL as glClipSphere() similar to glClipPlane(), or is there a way to achieve the same end? Of course, I could specify hundreds of tangential clipping planes to a given sphere but there's got to be an easier way.
No, there is no glClipSphere() or anything similar. But, you can make a very precise cut using vertex shader and clipping on per vertex basis. Not just a sphere, you can implement whatever you want.
Clipping a triangle by a sphere will not give you another triangle (or two) as clipping it with a plane does. You could instead use a fragment shader to discard all fragments outside the clipping sphere.
Thank you, I'll try that.