View Full Version : Display lists slow on nVidia?
12-03-2010, 12:56 AM
I've got a little OpenGL engine in which I've been rendering with glDrawElements so far. I just tried compiling such objects into display lists, and suddenly each render cycle started taking twice as much time, more or less.
I'm testing on a GeForce 9500. Is this slowness common to nVidia and/or other cards, or is it just me doing something wrong (not that I can think of what)? Should I consider display lists obsolete and use VBOs instead?
12-03-2010, 02:12 AM
Actually, after googling around a bit more on the issue, I just found out the GL_COMPILE_AND_EXECUTE, apparently, makes the display list slower. Using GL_COMPILE and then calling the list made a huge impact, and made the render loop a lot faster.
So, just wondering, should I still be using VBOs instead of display lists?
(I guess this thread should be moved to a more suitable forum now that it's obviously not an nVidia-specific issue.)
12-03-2010, 02:25 AM
First, yes, you should not compile the display list all over again as it takes quite much time.
Second, both on NVIDIA and ATI display list are usually as fast as VBOs (maybe sometimes even faster) so it is up to you which one seems more comfortable for you. However, consider the following remarks:
1. Display lists are deprecated functionality since OpenGL 3.0
2. Don't use display lists with VBOs, actually usually they don't even work and it would duplicate the data itself.
3. Display lists consume quite much memory and take a while to compile.
4. Display list data cannot be modified afterwards only by a recompile, while VBOs can be usually efficiently updated.
12-03-2010, 02:27 AM
You mean you used compile and execute each render cycle, or only once then call list for each render ?
12-03-2010, 02:34 AM
No, I most definitely only compiled them once, but I used the GL_COMPILE_AND_EXECUTE mode when doing so.
12-03-2010, 04:16 AM
Ok. So GL_COMPILE_AND_EXECUTE is tuned for faster compilation, less optimization, which sound sensible.
12-03-2010, 09:42 AM
To make some things clear, GL_COMPILE_AND_EXECUTE shouldn't have anything in common with optimization. It just means that commands are executed at the time the list is created (compiled).
On the other hand, GL_COMPILE means that the list is just to be compiled at the time glNewList() is called (or to be more precise after glEndList() and after a command buffer is full or a glFlush()/glFinish() command is executed).
In any case, if only glCallList(s) is called in the drawing function, it should be executed as fast as it can be. Especially on NVidia cards/drivers, DLs are faster than VBOs.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.