PDA

View Full Version : Cutting One Hole in a Shape



nicefive
03-03-2004, 01:42 PM
My problem is quite hard to explain, I have had a few goes at putting this across before but this should make it clear…

I want to be able to cut several holes out of a shape (ideally using the GLU tessellator) to make one big hole. I run into problems when the shapes (contours) overlap (I end up with islands).

I have uploaded a simple graphical example of what I am trying to do here: http://www.jbcode.com/problems/MultipleTessellation/

I expect that the best way around this would be to cut each shape out a time by feeding resulting data back into another tessellator.

What I want to establish is:

1. Is this possible?
2. Is this the best way to solve my problem?
3. How would I go about doing it?

Any help here would be greatly appreciated.

James.

endash
03-03-2004, 02:16 PM
What about using the stencle or depth buffer?
You could draw the holes as transparent and write to the depth buffer, offsetting them towards the viewer, then draw the big polygon.