getting framerate outside of debug overlay.

jchmack

06-02-2007 05:03:02

How do i get the framerate without using the debug overlay? When i have many objects on the screen the overlay takes up alot of processing power which throw off my framerates.

DieHard

06-02-2007 06:11:13

Use the default Ogre debugging from the code provided by the tutorials.

Here's one from wiki online:
http://www.ogre3d.org/wiki/index.php/Og ... cation_cpp

Goto line:
void OgreApplication::updateStats()

And line:
bool OgreApplication::frameEnded(const FrameEvent& evt)

CaseyB

06-02-2007 06:22:38

the overlay takes up alot of processing power which throw off my framerates.Really?!

luis

06-02-2007 08:08:46

try this:

www.fraps.com

jchmack

07-02-2007 03:11:52

well i was thinking more along the lines of actually having a value of fps in my program because i eventually want to output it to a file so i can see what is taking processing power up.

edit: ah im looking at the wiki now

Nudel

11-02-2007 14:08:35

Ogre::RenderWindow::getLastFPS()
This inside the FrameListener should work too.
1 / evt.timeSinceLastFrame

jchmack

11-02-2007 14:32:05

why doesn't this work:
float fps=Ogre::RenderWindow::getLastFPS();

1>error C2352: 'Ogre::RenderTarget::getLastFPS' : illegal call of non-static member function
1> : see declaration of 'Ogre::RenderTarget::getLastFPS'

betajaen

11-02-2007 14:40:01

Because there can be more than one render window so it's not a singleton.

It goes:

mWindow->getLastFPS()

jchmack

11-02-2007 14:48:41

Because there can be more than one render window so it's not a singleton.

It goes:

mWindow->getLastFPS()


thank you =)