Modern polygon triangulation

With OpenGL 4 what is the ‘modern’ way to tesselate arbitary polygons (with holes) into triangles?

Is it possible to do it on the GPU? The tessellation feature looks like it can only further subdivide triangles, not generate them.

If not possible to do on GPU, what is the most effcient library or algorithim for CPU triangulation?

I have tried GLU but the interface to it is horrible. Libtess2 also falls into this category.

What I want is something that can write directly into a vertex and index buffer using primitive restart. That way I can just fire the result at glDrawElements.

https://code.google.com/p/poly2tri

Very easy to use. It only handles 2D polygons, but of course it’s trivial to extend that to 3D manually.

Jan.