View Full Version : Limit of number of vertices in a polygon

07-03-2003, 05:00 AM
Hi, all

I'm having a problem with large numbers of vertices in a polygon. I'm trying to display the output from a scientific model and this model has some ellipse type surfaces that have more then a 1000 points in it. I create a call list and create the polygons. This runs fine, but when I call glCallList on this call list my application crashes. If I place a function in the code to skip every 2 vertices, this brings the number of vertices down around 350 and everything runs fine. Note, I have multiple polygons of this type in the call list. It does not seem to matter the overall size of the call list, just the size of the polygons within the list.

Is there a maximum number of vertices that a polygon can contain? If so how can I query for this number? Can this number be increased?


Jeff Naus

07-03-2003, 05:14 AM
"Is there a maximum number of vertices that a polygon can contain?"

No, sounds like a driver bug.
Try updating the drivers and if that's not helping and you're sure everything else is correct on your side send a small reproducer to your graphics hardware vendor's developer relation group.

07-03-2003, 05:34 AM
Convex polygons can also be rendered as triangle fans. You can easily do that by just changing the glBegin token (GL_POLYGON => GL_TRIANGLE_FAN ; doesn't get any easier than this http://www.opengl.org/discussion_boards/ubb/wink.gif).

07-03-2003, 06:23 AM
Careful, GL_TRIANGLE_FANs work differently with flat shading or glPolygonMode(GL_LINE).