In practice, most of the faces of the wavefront are coplanar and convex, but I can not find anything in the original OBJ specification stating that this is guaranteed.
If the face is coplanar and convex, you can use GL_TRIANGLE_FAN or GL_TRIANGLE and manually evaluate the fan. The fan has all the triangles dividing the first vertex. Like this:
If the number of vertices in the n-gon is large, using GL_TRIANGLE_STRIP or manually creating your own triangle stripes can give better visual results. But this is very rare in wavefront OBJ files.
If the face is coplanar but concave, it is necessary to triangulate the face using an algorithm such as a method of cutting ears.
http://en.wikipedia.org/wiki/Polygon_triangulation#Ear_clipping_method
If the vertices are not coplanar, you are screwed because the OBJ does not store enough information to know what form of tessellation was intended.
David jeske
source share