barzos
barzos

Reputation: 857

How can I get and change the framerate of OGRE application?

I am working on Ogre application that I set real time views as a background in my window. Hovewer I have question when I try to get my application's frame rate by using RenderTarget::getAverageFPS() and then I get 19.7433. Is this right frame rate ? and how can I change this frame rate for example to 30fps or 40fps ?

Upvotes: 0

Views: 1330

Answers (1)

Nicol Bolas
Nicol Bolas

Reputation: 474406

Unless your application is locked to the screen's vsync, you can't just change your framerate. You have to optimize your rendering, so that you can render within whatever framerate you desire. Or alternatively, render less stuff.

So if you want to render a frame 30 times a second, your rendering (and everything else) must happen within 1/30th of a second.

In short: Ogre is probably not directly the cause of your framerate. What you're telling Ogre to do is.

Note that you should be checking this in an optimized, release build, not debug. Debug builds are slow (because they're for debugging).

Upvotes: 3

Related Questions