View Full Version : Example of 2D (or 3D) complex polygon fill
05-07-2006, 09:41 AM
Am just starting out using OpenGL and need a good example of a complex polygon fill (one with may sides). Am at present drawing maps with such features as cities, counties, and lakes (having many sided polgons). Polygons at present don't have interior exclusion areas.
05-07-2006, 02:10 PM
Your biggest problem will be nonconvex polygons. I googled for:
to find an usefull article and I found this pdf for beginning:
It doesn't describe how to deal with nonconvex polygons, but it explains drawing polygons, line stipple and more things that can be usefull for maps.
Also - interior exclusion areas can be simply implemented by drawing a polygon with background color.
If you run into problems with nonconvex polygons, then perhaps we can talk about it. Righ now I'm leaving it up to you.
05-08-2006, 02:40 AM
You can use the GLU tesselator. Look gluTessBeginPolygon, gluTessCallback, ...
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.