5.b Drawing Optimizations

This page is just giving a starting point for optimizations, the links below provide more in-depth information.

  • Make sure there are no OpenGL errors. Any error usually kills the framerate.
  • Enable backface culling with GL.Enable(EnableCap.CullFace) rather than relying only on the Z-Buffer.
  • If you're drawing a scene that covers the whole screen each frame, only clear depth buffer but not the color buffer.
  • Organize drawing in a way that requires as few state changes as possible. Don't enable states that are not needed.
  • Use GL.Hint(...) wherever applicable.
  • Avoid Immediate Mode or Vertex Arrays in favor of Display Lists or Vertex Buffer Objects.
  • Use GL.DrawRangeElements instead of GL.DrawElements for a slight performance gain.
  • Take advantage of S3TC Texture compression and Vertex Cache optimizing algorithms.



Last edit of Links: March 2008