00001 // Based on the exampleFrameListener.h provided with OGRE (http://www.ogre3d.org/) 00002 // Well, ok. It was, once. 00003 #ifndef __IKFRAMELISTENER_H__ 00004 #define __IKFRAMELISTENER_H__ 00005 00006 #include "Common.h" 00007 00008 class FrameListener: public Ogre::FrameListener, public Ogre::WindowEventListener 00009 { 00010 public: 00011 00012 FrameListener(Ogre::RenderWindow* _window); 00013 ~FrameListener(); 00014 void windowResized(Ogre::RenderWindow* _window); 00015 void windowClosed(Ogre::RenderWindow* _window); 00016 00017 bool frameRenderingQueued(const Ogre::FrameEvent& evt); 00018 bool frameEnded(const Ogre::FrameEvent& evt); 00019 00020 Ogre::Real getTimeSinceLastFrame() const; 00021 00022 protected: 00023 00024 Ogre::Real m_timeSinceLastFrame; 00025 00026 Ogre::RenderWindow* m_window; 00027 00028 }; 00029 00030 #endif