Edit

Porting Clipping Planes

OpenGL implements clipping planes similarly to IRIS GL. In addition, in OpenGL you can query clipping planes. The following table lists IRIS GL clipping plane functions and their equivalent OpenGL functions.

IRIS GL function OpenGL function Meaning
clipplane (i, CP_ON, params) glEnable ( GL_CLIP_PLANEi ) Enables clipping on plane i.
clipplane( i, CP_DEFINE, plane ) glClipPlane ( GL_CLIP_PLANEi, plane ) Defines clipping plane.
glGetClipPlane Returns clipping plane equation.
glIsEnabled ( GL_CLIP_PLANEi ) Returns true if clip plane i is enabled.
scrmask glScissor Defines the scissor box.
getscrmask glGet ( GL_SCISSOR_BOX ) Returns the current scissor box.

 

To turn on the scissor test, call glEnable using GL_SCISSOR_BOX as the parameter.

??