FrameListener and Root::renderOneFrame() confusion

Description

Original reporter: systemparadox

The documentation gives conflicting answers to the question "does renderOneFrame() raise FrameListener events?".

The documentation for Ogre::Root::renderOneFrame() says "raising frame events before and after". That's a "yes".

The documentation for Ogre::FrameListener says "Frame events only occur when Ogre is in continuous rendering mode, i.e. after Root::startRendering is called. If the application is doing ad-hoc rendering without entering a rendering loop, frame events are not generated". That's a "no".

Checking the 1.6.4 source, the renderOneFrame() documentation is correct. FrameListener events are raised with renderOneFrame(). This is the current behaviour of my program.

Related to this confusion in the documentation is the problem that the FrameListener interface implements all of these methods. This means that if the signature of the overriding method is not 100% correct, no errors (compile or runtime) will be raised, leading to further confusion when trying to work out what the behaviour is supposed to be.

In particular frameStarted() takes a "const FrameEvent&", mistakenly declaring this as a non-const "FrameEvent&" is too easy to do and produces no errors or warnings. Is there something that can be done about this?

See also: http://www.ogre3d.org/forums/viewtopic.php?f=2&t=17691

Original Mantis Ticket: http://www.ogre3d.org/mantis/view.php?id=477

Environment

None

Assignee

M

Reporter

Philip Allgaier

Labels

None

Components

Fix versions

Affects versions

Priority

Minor
Configure