PDA

View Full Version : Clipping Planes



Rajveer
03-22-2002, 06:28 AM
From the following bit of code:

double eqn[4] = {0.0, 1.0, 0.0, 0.0};
glClipPlane(GL_CLIP_PLANE0, eqn);
glEnable(GL_CLIP_PLANE0);

everything that is located below the plane y=0 gets clipped. So how do I clip everything above the plane y=0 ??

Coconut
03-22-2002, 06:42 AM
Originally posted by Rajveer:
From the following bit of code:

double eqn[4] = {0.0, 1.0, 0.0, 0.0};
glClipPlane(GL_CLIP_PLANE0, eqn);
glEnable(GL_CLIP_PLANE0);

everything that is located below the plane y=0 gets clipped. So how do I clip everything above the plane y=0 ??

Try

double eqn[4] = {0.0, -1.0, 0.0, 0.0};

instead.