This is one way of drawing in OpenGL. But there are also other ways of drawing meshes, namely vertex arrays and vertex buffer objects. These seem to provide better performance, although I don't know about the actual performance improvement, because we are already using display lists.
Maybe we should consider changing to one of the other schemes, because the old scheme was removed in OpenGL 3.0. Although we are using OpenGL 2.1, it might be a good idea to switch anyway, if we want to change to a newer version of OpenGL some day.
Currently, all geometry is drawn using immediate GL calls in the form of:
This is one way of drawing in OpenGL. But there are also other ways of drawing meshes, namely vertex arrays and vertex buffer objects. These seem to provide better performance, although I don't know about the actual performance improvement, because we are already using display lists.
Maybe we should consider changing to one of the other schemes, because the old scheme was removed in OpenGL 3.0. Although we are using OpenGL 2.1, it might be a good idea to switch anyway, if we want to change to a newer version of OpenGL some day.
Some topic related reading: http://www.songho.ca/opengl/gl_vertexarray.html - difference between the schemes http://www.songho.ca/opengl/gl_vbo.html - explaination on vertex buffer objects https://gist.github.com/MorganBorman/4243336 - vertex array with pygame http://www.siafoo.net/snippet/316 - two schemes in PyQt4 (similar to PyQt5...)