Drawing Holed polygons

Kurt Akeley kurt at cashew.asd.sgi.com
Fri Jun 29 02:24:05 AEST 1990


In article <9006281312.AA06762 at tdisys.uucp>, farhad at tdisys.UUCP (Farhad
Pezeshgi) writes:
|> 
|> Hi,
|> 
|> Does anybody know how I can draw Holed polygons in the zbuffer mode. I might
|> have multiple holes but I do not have any islands. I would appreciate any
|> information.
|> 
|> 
|> 
|> ----------------------------
|> Farhad Pezeshi
|> Thomson Digital Image (TDI)
|> Paris, France
|> 
|> farhad%tdisys at inria.fr

On VGX systems you can draw the holes as "keep-out" regions into the
stencil buffer.  Then draw the polygon with the normal z-buffer active,
but omitting pixels that have marks in the stencil buffer.  Then clear
the stencil buffer (choose sclear, redraw of the holes, or redraw of the
entire polygon, whatever is expected to be fastest).

stencil() is a new GL command, available only on VGX hardware, and
documented only in the 3.3 release.  This same technique can be implemented
on GT/GTX machines using the pseudo-stencil techniques described in the
article "The Hidden Charms of Z-buffer" in issue 11 of the Iris Universe.
I know of no comparable algorithm for Personal Iris machines.

-- kurt



More information about the Comp.sys.sgi mailing list