how small is a "small" display list?

Diplomtennis
Unregistered
 
Post: #1
hi,

in the redbook it says:
Quote:Although you're not guaranteed that your OpenGL implementation optimizes display lists for any particular uses, the execution of display lists isn't slower than executing the commands contained within them individually. There is some overhead, however, involved in jumping to a display list. If a particular list is small, this overhead could exceed any execution advantage.


now, does anyone know how small is "small"? e.g. does it make sense to store a low polygon object with lets say 12 gl_triangles into a display list, or will this affect performance?

d.
Quote this message in a reply
Moderator
Posts: 1,560
Joined: 2003.10
Post: #2
The numbers I've heard are: Fewer than 10 vertices are more efficient in immediate mode than in a vertex array, and fewer than 100 vertices are more efficient in a vertex array than in a display list. I have no idea how accurate those numbers are, as I haven't benchmarked them myself...

Alex Diener
Quote this message in a reply
Moderator
Posts: 916
Joined: 2002.10
Post: #3
according to the apple video, if there are less than 16 polys, it doesn't optimize the list at all. Also, when passing data to display list, try to keep it in a consistent format, cause apple's drivers will detect that and try to optimize them. other than that, if you got a static object, I suggest you put it in a display list.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #4
amusing story about the consistency of data... I put this into a display list:

Code:
glBegin(GL_TRIANGLES);
for about 1000000 times
{
    glColor3f
    18 glVertex2f calls
}
glEnd();

That was taking about 2 minutes to compile into a display list

I changed the code to look like this:

Code:
glBegin(GL_TRIANGLES);
for about 1000000 times
{
    18 x glColor3f followed by glVertex2f
}
glEnd();

and display list compilation time went down under 1 second.
Quote this message in a reply
Diplomtennis
Unregistered
 
Post: #5
ok, thanks. So I guess I know where to go:
I put my objects into vertex arrays and the whole scene, which does not need to be transformed into a display list, right?
d.
Quote this message in a reply
Hog
Member
Posts: 151
Joined: 2002.09
Post: #6
OneSadCookie Wrote:amusing story about the consistency of data...

display lists somehow behave quite differently on different hardware. on nvidia cards compiling immediate mode calls into a display list seems to make calling the lists extremely slow. my guess is that ati cards somehow optimize the lists or store them completely different than the geforce cards i've tried (drawing vertex arrays into lists works fine on the other hand).
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Small error with glViewport and gluPerspective? cjcaufield 1 3,423 Sep 20, 2009 01:10 AM
Last Post: DoG
  Drawing strategies for many small models Fenris 11 4,715 Nov 20, 2006 06:10 AM
Last Post: unknown
  Consistent "look" between small and large objects WhatMeWorry 1 2,566 Oct 10, 2005 12:26 AM
Last Post: Fenris
  Roots of Display List Overhead aarku 10 5,580 Apr 12, 2005 12:24 PM
Last Post: FCCovett
  Display list overhead TomorrowPlusX 4 4,128 Dec 20, 2004 02:13 PM
Last Post: TomorrowPlusX