StartRendering VS RenderOneFrame


22-03-2011 11:34:42

The tutorials suggest using the method StartRendering, and using framelisteners to determine when to take care of updates (like input management). What about using the method RenderOneFrame? I could deal with input and other updates in the game loop, then just call RenderOneFrame at the end. Is this a valid way of doing this, or is there any performance penalty if I don't use Framelisteners?



22-03-2011 14:06:32

Actually, I just posted a topic exactly like this that Smiley80 was gracious enough to answer.

The method would be:
while (!OGREWin.IsClosed)
if (!mRoot.RenderOneFrame())


I'm not sure about performance, but this is how you would do it with RenderOneFrame().


23-03-2011 17:35:03

RenderOneFrame gives you more control. Sometimes I have to "pause" rendering because the control is not visible, or im doing something sketchy with buffers that break ogre if i try to RenderOneFrame during the process.