Shading problem with GL_POLYGON..

I trying to implement 3D map with geographic data. These data were consist of
a large number of vertices, irregularly. So I wrote drawing mode ‘glBegin(GL_POLYGON)’
and rendering scene was fine.

But when I filled these polygons for shading, it happened incorrectly result.
I show you some case…

before filling
after filling

I think OpenGL renderer designed to optimize, so it fill with winding in outline
for optimization. Is this right? If I fault, tell me good idea this problem.
How can I solve this problem?

[This message has been edited by spidy (edited 11-02-2000).]

[This message has been edited by spidy (edited 11-02-2000).]

[This message has been edited by spidy (edited 11-02-2000).]

Hum hum, am i still sleeping or did you forgot something in this post

Ooooops, i was sleeping :

GL_POLYGON is only specified for convex polygons. Yours is concave.
Have a look at the glu-functions, there should be tesselators in it.