Advertisement

about display lists

Started by July 18, 2005 02:20 AM
3 comments, last by alexgsmith 19 years, 1 month ago
I dont really understand display lists. Under what circumstances do they speed up the application? Currently, i have a very simple world (a huge quad as the ground, a small quad place on top of it, a cube sliding around on the huge quad, and the camera follows the cube around). If i use glBegin(GL_QUADs) when i draw each frame, i get around 175 fps. Then i tried using display lists. I create display lists for all 3 objects at the beginning, and use glCallList when i draw each frame after i translate and rotate accordingly for the camera position. When i run it, however, the framerate drops to 100 fps. So, im wondering, how come display lists made my application run almost twice as slow? Under what circumstances do they speed things up? And while we're on the topic, how about VBOs? Do they only help under certain circumstances too? Thanks.
Are you building lists on the fly? I mean building it evry frame? You should only build display lists once.

Hi.
Advertisement
Nonono. I create all 3 at the beginning, and glCallList each frame.
Try replacing that groundquad by a 512x512 heightmap terrain. You should immediately be able to notice an increase in performance with displaylists under those circumstances. Displaylists, vertexarrays and VBO's are meant for handling large amounts of geometry. You are only rendering 8 polygons, so there is no need for these.
I posted a similar question about the comparisons of VBOs, VBs and Display Lists, if you want to look up Vertex Buffers vs Display Lists (or the other way round, can't remember!) on this forum. In my application, depending on what PC and gfx card I used I got pretty varying results, so I let the user choose which method to use. VBOs didn't give me the performance boost I was expecting over display lists.

This topic is closed to new replies.

Advertisement