in a wavefront object file (.obj) how am i supposed to render faces with more than 4 vertices in opengl?
问题 So using a Wavefront object file how am i supposed to render faces that have more than 4 vertices in OpenGL? I understand that if it has 3 vertices I use GL_TRIANGLES , if it has 4 I use GL_QUADS , but if it has 5 or more, what am I supposed to use? Is there a standard? 回答1: OBJ exporters will export the vertices in a sane order for each face (anti-/clockwise), and long as your faces are coplanar and convex (which they bloody should be!) - you can use GL_TRIANGLE_FAN. I disagree with Nicol