Exemple de plan de clipping |

void display(void) {
GLdouble eqn[4] = {0.0, 1.0, 0.0, 0.0}; /* y < 0 */
GLdouble eqn2[4] = {1.0, 0.0, 0.0, 0.0}; /* x < 0 */
glClear(GL_COLOR_BUFFER_BIT);
glColor3f (1.0, 1.0, 1.0);
glPushMatrix();
glTranslatef (0.0, 0.0, -5.0);
glClipPlane (GL_CLIP_PLANE0, eqn);
glEnable (GL_CLIP_PLANE0);
glClipPlane (GL_CLIP_PLANE1, eqn2);
glEnable (GL_CLIP_PLANE1);
glRotatef (90.0, 1.0, 0.0, 0.0);
glutWireSphere(1.0);
glPopMatrix();
glFlush();
}