c++openglframe-ratedisplaylist

Display Lists and OpenGL states


This is strange.

When I render my mesh, the fps is a stable 130 or so.

When I put it into a display list, the fps DROPS to little more than 15.

When I take out the few material and texturing commands, it goes back up to 130.

Why is this? Why are the OpenGL state changing commands so pressing on FPS? I think I read somewhere not to ever, ever do this.


Solution

  • The most common mistake is putting the display list creation into the render loop. Make sure you are creating the display list somewhere during initialization and only rendering it in the render loop. Aside from that, you will just have to post a code sample for us to look at.