Results 1 to 7 of 7

Thread: Does it worth to put a line inside a display list?

  1. #1
    Senior Member Frequent Contributor
    Join Date
    Dec 2005
    Location
    Italy
    Posts
    659

    Does it worth to put a line inside a display list?

    Hi All,

    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?

    Thanks,

    Alberto

  2. #2
    Senior Member Regular Contributor remdul's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands
    Posts
    346

    Re: Does it worth to put a line inside a display list?

    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.

  3. #3
    Senior Member Frequent Contributor
    Join Date
    Dec 2005
    Location
    Italy
    Posts
    659

    Re: Does it worth to put a line inside a display list?

    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?

    Thanks,

    Alberto

  4. #4
    Senior Member Frequent Contributor
    Join Date
    Nov 2002
    Location
    Latvia
    Posts
    626

    Re: Does it worth to put a line inside a display list?

    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.

  5. #5
    Senior Member Frequent Contributor
    Join Date
    Dec 2005
    Location
    Italy
    Posts
    659

    Re: Does it worth to put a line inside a display list?

    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?

    Thanks,

    Alberto

  6. #6
    Senior Member OpenGL Guru
    Join Date
    Oct 2004
    Posts
    4,661

    Re: Does it worth to put a line inside a display list?

    Quote Originally Posted by devdept
    When it worth to use a display list?
    1. When you have the time to actually compile the display list (e.g. startup; i.e. not when rendering),
    2. When you don't need to change the batch data,
    3. When you don't care about the memory consumed by the display list,
    4. When you want the absolute fastest draw performance possible (even faster than VBOs, sometimes much faster -- true on NVidia at least)
    5. 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.

  7. #7
    Senior Member Frequent Contributor
    Join Date
    Dec 2005
    Location
    Italy
    Posts
    659

    Re: Does it worth to put a line inside a display list?

    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.

    Thanks,

    Alberto

Similar Threads

  1. Change context inside a display list
    By Ignasi in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-21-2011, 06:26 AM
  2. VBO inside a display list
    By Lord crc in forum OpenGL: Windows
    Replies: 7
    Last Post: 04-23-2007, 12:29 PM
  3. Accessing a VBO inside a display list
    By tcobbs in forum OpenGL: Advanced Coding
    Replies: 5
    Last Post: 01-25-2004, 03:00 AM
  4. Texture objects -inside- display list
    By P88_Razor in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 01-22-2003, 11:49 PM
  5. is it possible to draw vertex arrays inside of a display list ?
    By Morglum in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 07-10-2002, 03:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean