As the title suggest, I would like to increment Root::mCurrentFrame manually. Maybe in the form of new method Root::_incrementFrameNumber(). The reason is since I dont use any FrameListener, I would like to skip calling _fireFrameStarted (which is called by renderOneFrame). So instead of calling Root::renderOneFrame, I would like to update my graphics loop to be like this:-
Well you know without incrementing the frame number, my animated entities dont get animated.
A willow deeply scarred, somebody's broken heart
And a washed-out dream
They follow the pattern of the wind, ya' see
Cause they got no place to be
That's why I'm starting with me
syedhs wrote:As the title suggest, I would like to increment Root::mCurrentFrame manually. Maybe in the form of new method Root::_incrementFrameNumber(). The reason is since I dont use any FrameListener, I would like to skip calling _fireFrameStarted (which is called by renderOneFrame). So instead of calling Root::renderOneFrame, I would like to update my graphics loop to be like this:-
Well you know without incrementing the frame number, my animated entities dont get animated.
I just used to call _fireFrameStarted() and _fireFrameEnded(), which did the job (even though I didn't use frame listeners). Though now I just call renderOneFrame(), even though it does more "managing" than "rendering" - I update all of my render targets manually (SceneManager::_renderScene, actually).
nullsquared wrote:FrameStarted() and _fireFrameEnded(), which did the job (even though I didn't use frame listeners).
Actually that is what I am doing now, so the point is there are unnecessary (to app not using FrameListener) calculations done in _fireFrameStarted/Ended. Although the time taken maybe trivial, I wouldn't want to waste CPU cycle on those unnecessary calculations.
A willow deeply scarred, somebody's broken heart
And a washed-out dream
They follow the pattern of the wind, ya' see
Cause they got no place to be
That's why I'm starting with me
You must still call the _fireFrame* methods. There are internal Ogre workings that rely on this, so it doesn't matter if you don't have your own FrameListeners, if you're running your own loop you must still raise these events. Not optional
Ah I forgot that I did search addFrameListener (Ctrl+Shift+F) to search any Ogre dependence on FrameListener - looks like I am defeated.
Case closed.
A willow deeply scarred, somebody's broken heart
And a washed-out dream
They follow the pattern of the wind, ya' see
Cause they got no place to be
That's why I'm starting with me