ARB_vertex_array_object and display lists


I have a question, mostly out of pure interest, as it doesn’t affect performance that much anyway.

I’m writing a plugin for Autodesk Maya, where i’m limited to a OpenGL 2.1 context, but as the application requires a pretty fast computer, i take advantage of some of the new features using the ARB-extensions to higher the performance. One of them is the ARB_vertex_array_object. Now, to further eliminate the amount of gl calls when performing the rendering, and as the data i’m rendering is pretty static, i use display lists. There isn’t much said about display lists in the paper and i assume, since display lists is pretty much deprecated, that they don’t want it supported. There is a mention in the paper ‘Modify Section 5.4, Display Lists (p. 240)’ and i guess they’re talking about the paragraph about calls not allowed when compiling a display list.

However, i just tried to put the glBindVertexArray call inside a display list, and on my graphics card (Radeon HD 6800 series), this actually works. I know that it is probably not a good idea releasing the software this way, as there’s no guarantee it will work on all platforms, but still, is it supposed to work?


The spec says that VAO functions are not compiled into display lists, but are executed immediately, even if you are within a glNewList/glEndList. This doesn’t describe that if it works or if it doesn’t, it describes how it works.

First of all, considering that vertex buffer data is not used by display lists anyway, but rather they are “copied” at list creation time (i.e. takes a snapshot of the current values) there is not much sense in using VBOs or VAOs with display lists, but it actually should work. And here I mean work so, that it will get executed immediately, thus calls to draw call will take a snapshot of the correct VAO settings from the VBOs.

The point is, no matter how nice new OpenGL features you are using, if you put them inside a display list, almost none of them are of any use. Just by using VBOs with display lists, you are already duplicating vertex data as display lists (at least according to the spec) disregard server side vertex arrays.

If you really want to use display lists, then don’t bother much with adding also new drawing features as they are unlikely to speed up your rendering and will likely end up consuming even more memory than otherwise (though display lists consume a lot of memory anyways). With display lists, you should probably end up with the same performance, no matter if you use immediate mode, client vertex arrays or the latest VAO+VBO combo.

Though, if you want to hear my advice, abandon display lists all together, or at least remove them from the actual drawing code (i.e. when you set up vertex arrays and when you perform your draw calls). You just limit yourself by not having the possibility to change the geometry efficiently and you also waste a lot of memory.

Oh of course, you’re right. I totally forgot that the arrays are copied…