Tsaras
Tsaras

Reputation: 493

opengl GLFW application bad performance in debug mode

I'm making a small demo application learning opengl 3.3 using GLFW. MY problem is that, if I run a release compile it runs at about 120 fps. A debug compile runs at about 15 fps. Why would that be?

It's a demo shooting lots of particles that move and rotate.

Upvotes: 0

Views: 873

Answers (1)

a.lasram
a.lasram

Reputation: 4411

If the app isn't optimized and spends a long time executing non-OpenGL commands, the OpenGL device can be easily in a idle situation.

You should profile the app without OpenGl commands (as if you have an infinitely fast OpenGL device) and check your FPS. If it's very slow this will be an indication that your app is CPU bound (probably in release mode too).

In addition if you're setting debug options in opengl/glsl, poor performance wouldn't be a big surprise.

Debug mode should be used to debug the app and 15fps still gives you a more or less interactive experience.

If the particle system is animated with the CPU (OpenGl only renders), you should consider a GPU accelerated solution.

Upvotes: 3

Related Questions