Printing the framerate to the Python interpreter

MortalofPower

07-12-2009 14:33:17

I've looked every where and found out how to do this in the C++ version of Ogre, but how do you get and print the frame rate of a graphical application using Python-Ogre? Any help is much appreciated!

andy

07-12-2009 23:58:44

It's stored in the (Ogre) renderWindow object and you can take a look at the sample framework ./packages_2.6/ogre/renderer/OGRE/sf_OIS.py in the function _updateStatistics to see details..

However basically you can do
print self.renderWindow.getAverageFPS()


Andy

MortalofPower

08-12-2009 01:02:03

Ah thank you very much that did the trick!