Using the console printing we are going to inspect when the FrameListener
is called.
bool frameStarted(const Ogre::FrameEvent& evt) { std::cout << «Frame started» << std::endl; return false; } bool frameEnded(const Ogre::FrameEvent& evt) { std::cout << «Frame ended» << std::endl; return false; } bool frameRenderingQueued(const Ogre::FrameEvent& evt) { std::cout << «Frame queued» << std::endl; return false; }
We added a "debug" output to each of the FrameListener
functions to see which function is getting called. Running the application, we noticed that only the first debug message is printed. The reason is that the frameStarted
function returns false
, which is a signal for the root
instance to close the application.
Now that we know what happens when frameStarted()
returns false
, let's see what happens when frameStarted()
returns true
.
3.144.151.126