Raster clipping

This is another of those OpenGL questions rather than an LWJGL question.

Can anyone recommend how to do clipping during 2D raster drawing (glDrawPixels)? OpenGL allows clipping planes in 3D, but these don’t seem to apply to raster operations, and there don’t seem to be any raster equivalent.

Thanks.

Take a look at:

glViewport
glScissor
the stencil-buffer

Riven, glScissor looks like just what I need, many thanks!

EDIT: yup, glScissor works nicely, thanks.