1. A method for rendering a computer-generated image using a stencil buffer, comprising: receiving a complex arbitrary polygon comprising multiple closed polygonal contours, the multiple close polygonal contours comprising at least an outer contour and one or more inner contours; separating the complex arbitrary polygon into its constituent closed polygonal contours; dividing each constituent closed polygonal contour into primitives, each primitive being a polygon having at least 3 and at most P vertices where 2<P<N, where N is the number of vertices of the closed polygonal contour; concatenating the resulting primitives with primitives resulting from dividing one or more of the other constituent closed contours; and using a stencil buffer to render the concatenated primitives to produce a computer-generated image.