clipping

i want to do my own clipping, however, i dont know how i should go about it.
after i determine what planes i want to clip against, how do i efficiently clip against them.
can i tell open to clip against certain planes.
how do i determine if a ploly is inside or outside a plane.

ah yes here it is glClipPlane(GLenum plane, const GLdouble * equation)

where plane= GL_CLIP_PLANE0 (etc)

and equation is the four vars defining a plane

(X,Y, Z, W)

Also I assume you mean that you need to know if a poly is inside a volume enclosed by planes… sorry, but I don’t know, but am actively trying to figure it out (i.e. other posts such as culling/clipping)
before using you must enable

 GLdouble equation[4]={0,1,0,0}
 glEnable(GL_CLIP_PLANE0)
 glClipPlane(GL_CLIP_PLANE0, equation);

[This message has been edited by frogger (edited 06-06-2000).]

[This message has been edited by frogger (edited 06-06-2000).]

xerid,

Just as a side vendor-specific note, you’re probably better off letting OpenGL do the standard clipping if you’re using nvidia
hardware. It’s very efficient.

Indeed you are, but I think the poster is actually referring to ‘View Frustum Culling’, rather than clipping.

You’re better off doing this, because if an object is outside the view frustum you don’t really need to send the data to OpenGL. It’ll get transformed (a waste of time) and then get clipped out.

Paul