How to draw a polygon in OpenGL ES ?

Hello guys,

I’m using OpenGL ES on Symbian. It does not support polygon primitive type.

I’m wondering how can I draw a polygon in any shape, some thing like this:

http://img188.imageshack.us/img188/3212/shape.png

and I want to fill it with a texture, so I cannot use lines.

Thanks,

In standard OpenGL also, filled concave polygons like yours can not be drawn.
Either you split it in triangles by hand, either you do that algorithmically (not sure how to do that efficiently though).

I found this page: http://codesuppository.blogspot.com/2009/07/polygon-triangulator-ear-clipping.html

But it does not work for me. Does any one have a working source? I don’t want to redo from scratch.

Thanks,