View Full Version : Does it worth to put a line inside a display list?
12-02-2009, 03:21 AM
When it worth to use a display list? Suppose you need to draw a line strip that can have multiple segments but normally it has only one. Shall we use always a display list or check if the number of segment is less than 2 (or maybe 4 or 5) and use standard glBegin(GL_LINE_STRIP) / glEnd() approach?
12-02-2009, 11:09 AM
If the geometry doesn't change between frames, it is likely that display lists will be faster than regular glBegin/glEnd, unless the driver implementation is really poor. I've heard display lists are still quite fast on Nvidia hardware, on par with VBOs.
But it will still rely on the nature of the program. It's easy to try display lists, just do a quick benchmark.
12-02-2009, 03:07 PM
Many lines can consume Display List IDs and I was wondering if it worth to encapsulate them inside a DL.
I think that DL are not designed to store only a couple of glVertex calls. Am I wrong?
12-02-2009, 03:33 PM
Is there a performance problem? I wouldn't bother about this issue much for now.
Few lines here and there won't make much of a difference.
12-03-2009, 01:27 AM
Suppose you have a million of lines, and a million of texts will you use display list for everything? Where is the benefit of using display list for a two vertices entity?
12-03-2009, 06:25 AM
When it worth to use a display list?
When you have the time to actually compile the display list (e.g. startup; i.e. not when rendering), When you don't need to change the batch data, When you don't care about the memory consumed by the display list, When you want the absolute fastest draw performance possible (even faster than VBOs, sometimes much faster -- true on NVidia at least) When you're happy to ignore the ARB's deprecation of display lists and use compatibility profiles (NVidia has already said this stuff isn't going away, and I've not yet seen the vendor whitepapers on How to Cook VBOs That'll Consistently Beat Display Lists, so I'm not gonna stop using display lists).
As to the specific "break even" points with specific CPUs, GPUs, drivers, vertex attribute formats, interleavings, primitive types, etcetcetc. you'll just have to test on the configurations you care about. I'd think it'd be a waste to compile a single 2-vert line into a display list (partly because if you're doing that you obviously don't care about its perf), but just test and see!
Note that above I'm speaking specifically of geometry-only display lists (just batches and batch setup binds). I don't mix general state changes in with display lists.
12-03-2009, 06:59 AM
We were compiling everything and loading a big AutoCAD file we went out of free display list IDs.
No we need use less IDs :) and were wondering after how many glVerticed() calls it *really* worths to start using them.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.