kikosmalltalk
06-05-2008 04:19:35
Hi everyone
I have a question for OgreNewt wrapper.
Does Ogre use interpolation for the rendering?
I can't find the use of the interpolation in the code!!.
Newton update code:
My code is very similar and I need the interpolation for rendering.
Look this article: http://www.gaffer.org/game-physics/fix-your-timestep/
If ogreNewt doesn't use interpolation. How does it solve the stuttering problem?
I'm looking any topic, but I can't find anything useful.
advance thank you
kiko
PD: I should explain that at the moment I don't use Ogre
I have a question for OgreNewt wrapper.
Does Ogre use interpolation for the rendering?
I can't find the use of the interpolation in the code!!.
Newton update code:
bool BasicFrameListener::frameStarted(const Ogre::FrameEvent &evt)
{
m_elapsed += evt.timeSinceLastFrame;
Ogre::LogManager::getSingleton().logMessage(" Newton Frame Listener... m_elapsed: "+Ogre::StringConverter::toString(m_elapsed)+
" m_update:"+Ogre::StringConverter::toString(m_update));
int count = 0;
if ((m_elapsed > m_update) && (m_elapsed < (1.0f)) )
{
while (m_elapsed > m_update)
{
m_World->update( m_update );
m_elapsed -= m_update;
count++;
}
}
else
{
if (m_elapsed < (m_update))
{
// not enough time has passed this loop, so ignore for now.
}
else
{
m_World->update( m_elapsed );
count++;
m_elapsed = 0.0f; // reset the elapsed time so we don't become "eternally behind".
}
}
My code is very similar and I need the interpolation for rendering.
Look this article: http://www.gaffer.org/game-physics/fix-your-timestep/
If ogreNewt doesn't use interpolation. How does it solve the stuttering problem?
I'm looking any topic, but I can't find anything useful.
advance thank you
kiko
PD: I should explain that at the moment I don't use Ogre