(I am using PyOpenGL and my laptop runs OpenGL 2.1)
I heard that OpenGL draws triangles are much faster than polygons, but that also that using display lists cuts the overhead. Would I gain any speed by converting my models into triangle strips, if I they are currently in polygons (triangles and quads and others) and using glBegin(GL_TRIANGLE_STRIP)
to draw instead of glBegin(GL_POLYGON)
, if I am using display lists anyway? Does the display list automatically trianglulate everything?
I have models with about 50 faces in obj format and the list is made with this code:
treelist = glGenLists(1)
glNewList(treelist, GL_COMPILE)
for s in OBJ.treeobjs:
for face in s.faces:
verts, normals, texcoords = face
glBegin(GL_POLYGON)
for i in range(len(verts)):
glNormal3fv(s.normals[normals[i]])
if texcoords[i] > 0:
glTexCoord2fv(s.texcoords[texcoords[i]])
glVertex3fv(s.vertices[verts[i]])
glEnd()
glEndList()
and drawn with:
glCalllist(treelist)
But if I wanted to convert everything to a triangle strip (triangulation is easy in blender) I would have to use a different format than obj?