Time for action — returning true in the frameEnded function

Now let's test the last of three possibilities.

  1. Change frameRenderingQueued to return true:
    bool frameEnded (const Ogre::FrameEvent& evt)
    {
    std::cout << «Frame ended» << std::endl;
    return true;
    }
    
  2. Compile and run the application. You should see the scene with Sinbad and an endless repetition of the following three lines:

    Frame started

    Frame queued

    Frame ended

What just happened?

Now, all event handlers returned true and, therefore, the application will never be closed; it would run forever as long as we aren't going to close the application ourselves.

What just happened?

Get Ogre 3D 1.7 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.