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) | Enable clipping on plane i. |
clipplane(i, CP_DEFINE, plane) | glClipPlane(GL_CLIP_PLANEi, plane) | Define 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) | Return the current scissor box. |
To turn on the scissor test, call glEnable using GL_SCISSOR_BOX as the parameter.