Display list

Started by
6 comments, last by Renran 15 years, 11 months ago
Hello, I made a nice little terrain program in immediate mode. I have 100 fps. I thought lets get performance up. I use display lists for testing. Everything works fine. I have 80 fps. How can this be? Thanks, RenRan
Advertisement
Is your display list static or dynamically modified? Try scaling the number of vertices/objects to render in both cases to see which is better. Also, profile both CPU and GPU performance to see where the bottleneck is.

Also, don't measure in FPS, measure in milliseconds per frame/render/draw operation, as you don't measure racing results in avg. speed either, but in the time they used to finish the lap.
how many display lists are you using? if you are calling alot of display lists vs. making 1 call, the overhead of making a bunch of calls could make ur performance worse.
Well I'm using 1 display list.
And it is a static list.
Just vertices with texture on top.
27 x 22 x 4 vertices.
What do You think about vertex arrays or VBO's.
But why is my display list not working?

Thanks,

RenRan
Sounds like you don't have too many vertices in the first place so a VBO is not likely to help you. I'm surprised that display list would be slower than immediate mode. That's really special.
Are you using blending or alpha testing or stencil?
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
Vman: No, no blending, no alpha testing, no stencil?
Just plain vertices and textures.
But just asking, in the list there are also things like variables, loops,
and things like:

glEnable(GL_LIGHTING); // Enable Lighting
glColor3ub (color1, color2, color3); // define color
glEnable(GL_TEXTURE_2D); // Enable Texture
glBindTexture( GL_TEXTURE_2D, TextureArray[0] );

is that the reason, without this things the display list doesn't work.

Thanks,

RenRan
Well, it simply sounds like on your particular hw and driver combination, for some reason display lists don't perform so well.
If you want, give VBOs a try. Perhaps you will get better performance than display lists.

Have you tried making a geometry only display list? That means moving other calls like glEnable outside of the disp list.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
Well, thanks and You are right, my video chip is a GMA 950 from Intel.
Not the best one and not fast.

Thanks guys,

RenRan

This topic is closed to new replies.

Advertisement