PDA

View Full Version : How to display a concave polygon without use of tessllation



Xiaofeng
03-06-2002, 03:41 PM
The polygon has no inner loop, and may intersect itself, Does OpenGL provide any method to display such polygon?

I think the scan line algorithm can meet my desire, but how in OpenGL?

Thank you!

Bob
03-06-2002, 10:46 PM
OpenGL only guarantees correct drawing of convex polygons. Concave polygons gives an undefined behaviour.

GLU provides some functions for concave polygons I believe.

Xiaofeng
03-07-2002, 12:36 AM
Originally posted by Bob:
OpenGL only guarantees correct drawing of convex polygons. Concave polygons gives an undefined behaviour.

GLU provides some functions for concave polygons I believe.

Hehe, I found that use of stencil buffer can solve this problem, and it's a bit faster tesslation.