VBO or Display List

Those of you who hang around alot in this section will see I’ve posted a lot to do with rendering systems recently, please forgive me, I’m just curious :slight_smile:

So my main question as you can see, is should I use VBOs or Display Lists, what situations are they more suited for?

I ask this because I’ve recently been checking out and learning from the Minecraft source code, and I noticed notch doesn’t use VBOs anymore to render his chunks, he’s actually using Display Lists. Any idea why he decided to make the switch, as I’m pretty sure he was using VBOs at one point.

Thanks 8)

I’m not sure why another thread is necessary. Display lists and immediate mode are old and deprecated. If you want to learn OpenGL, then learn the modern pipeline.

Rolling your own sprite batcher is fairly pain-free when using LibGDX’s utils, see here:

The rest of my tutorials might also be of interest to you.

It will of course be much more challenging to re-write all that boilerplate yourself, and it probably won’t be nearly as efficient as LibGDX (which uses native C for things like vector math).

Minecraft’s rendering code is pretty bad. Lots of deprecated rendering techniques that will not work on many drivers (i.e. mobile). Definitely do not use it as a reference.

Please download the MinecraftCoderPack and look at the chunk renderer.
Minecraft is actually using VAO’s to render everything, but it does this in a horribly slow+bad way.

  • Longor1996

As far as I remember, he uses display lists.

It used to only be display lists but now you can turn on the “Advanced OpenGL” setting and then it uses VBOs or VAOs.

Regarding the initial question. If you want to easily migrate your code to mobile then don’t go display lists. If that isn’t a requirement for you just go with what is easiest for you so you get to see results on your screen.

As noted with the Minecraft reference the one or the other will not make or break your possiblity to some time in the future sell your game if that is your goal.

Doing some testing with my nvidia drivers got me to the conclusion that display lists take way longer to create and is therefore not good for objects that change often. On the other hand the performance of the display lists once created were the same or even a little bit faster than VBOs.

Mike

Hi

I agree with Mickelukas but in my case, display lists are sometimes interesting only on tiny meshes (tens of triangles) or on a very few very old Intel chips that claim to support OpenGL 1.5 including VBOs but very slowly. I don’t really see the interest of using them, most of Java scenegraphs don’t use them or expose them only in specific renderer delegates that are very rarely used. Display lists have never been designed for dynamic meshes and some drivers support them under the hood by using … VBOs :slight_smile: If I were you, rather use only immediate mode without display lists if you just make some rapid prototyping, use retained mode (vertex arrays + compiled vertex arrays or VBOs) otherwise.

He draws the geometry out using VAOs, but the output from the VAO is then assigned to a display list