Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 7 of 7

Thread: Display lists slow on nVidia?

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2009
    Posts
    9

    Display lists slow on nVidia?

    Dear forum,

    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?

  2. #2
    Junior Member Newbie
    Join Date
    Mar 2009
    Posts
    9

    Re: Display lists slow on nVidia?

    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.)

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Dec 2007
    Location
    Hungary
    Posts
    985

    Re: Display lists slow on nVidia?

    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.
    Disclaimer: This is my personal profile. Whatever I write here is my personal opinion and none of my statements or speculations are anyhow related to my employer and as such should not be treated as accurate or valid and in no case should those be considered to represent the opinions of my employer.
    Technical Blog: http://www.rastergrid.com/blog/

  4. #4
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,580

    Re: Display lists slow on nVidia?

    You mean you used compile and execute each render cycle, or only once then call list for each render ?

  5. #5
    Junior Member Newbie
    Join Date
    Mar 2009
    Posts
    9

    Re: Display lists slow on nVidia?

    No, I most definitely only compiled them once, but I used the GL_COMPILE_AND_EXECUTE mode when doing so.

  6. #6
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,580

    Re: Display lists slow on nVidia?

    Ok. So GL_COMPILE_AND_EXECUTE is tuned for faster compilation, less optimization, which sound sensible.

  7. #7
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    1,162

    Re: Display lists slow on nVidia?

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •