Scalahansolo
Scalahansolo

Reputation: 3015

When to use OpenGL Display Lists?

I am currently working on a project where I am attempting to recreate this logo but animate the gears on top of the static things. Now this is what I have created so far...

enter image description here

So far it is looking nice and I am moving onto the gears today. While doing some research on the gears I came across display lists in openGL and have read a little about them. It seems that they are good for performance as they reduce the need to redraw content over and over like when I move my camera around the sign and/or when the gears are moving. What I have so far is just a ton of polygons that make up the sign background and the letters. The curved letters are made up of a ton of triangle polygons.

So my main question is, before I move onto getting the gears created, should I take the time to create display lists for the content I already have? Or is it just not necessary? I am basing my gears off the famous gears.c which uses display lists, so I most likely will use them there.

Upvotes: 0

Views: 201

Answers (1)

Colonel Thirty Two
Colonel Thirty Two

Reputation: 26579

It depends on how you're rendering your objects at the moment.

If you're using immediate mode (glBegin/glVertex/glEnd), then wrapping the display lists will help. But both immediate mode rendering and display lists are depreciated starting with OpenGL 3, and switching to vertex buffer objects (VBOs) will likely net a better performance increase (at the expense of rewriting a bit of code).

If you're already using VBOs, then wrapping those calls in a display list will likely not make any difference.

https://open.gl/ is a nice tutorial for modern OpenGL.

Upvotes: 4

Related Questions