Converting OpenGL draw lists to vertex arrays or VBOs
问题 I'm trying to convert a program using draw lists, which are deprecated in OpenGL 3.0+, to use either vertex arrays or VBOs, but I'm not finding any examples of how to do the conversion. What's in the program now is this (happens to be Python, but really what I'm interested in is the appropriate OpenGL calls---it could just as well be C++, for example): dl = glGenLists(1) glNewList(dl, GL_COMPILE) glBindTexture(GL_TEXTURE_2D, texture) glBegin(GL_QUADS) glTexCoord2f(0, 0) glVertex2f(0, 0)