Closed ll1733 closed 7 years ago
You need to triangulate every polygon, and then render the triangles. You can do it programmatically (https://en.wikipedia.org/wiki/Polygon_triangulation) or using a modeling software like blender (https://www.blender.org/manual/modeling/modifiers/generate/triangulate.html).
I downloaded some obj files and noticed that not all of them used triangles to draw faces. However, it seems that GL_QUADS and GL_POLYGON are deprecated in modern openGL. Then how should I draw faces with more than 3 vertices?