Found a bug in Root::_fireFrameEnded

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
Liaven
Gnoblar
Posts: 20
Joined: Wed Jan 28, 2004 6:51 pm
Location: Granada, Spain

Found a bug in Root::_fireFrameEnded

Post by Liaven » Tue Mar 22, 2005 10:09 am

Hi

As described in topic http://www.ogre3d.org/phpBB2/viewtopic.php?t=8609 there is a bug in Root::_fireFrameEnded, the HardwareBufferManger doesn't release the buffer copies if a frameended returns false, a posible solution might be

Code: Select all

bool Root::_fireFrameEnded(FrameEvent& evt)
{
  bool res = true;

  // Tell all listeners
  std::set<FrameListener*>::iterator i;
  for (i= mFrameListeners.begin(); i != mFrameListeners.end(); ++i)
  {
    if (!(*i)->frameEnded(evt))
    {
       res = false;
       break;
     }
   }

   // Tell buffer manager to free temp buffers used this frame
   if (HardwareBufferManager::getSingletonPtr())
     HardwareBufferManager::getSingleton()._releaseBufferCopies();

   return res;
}
0 x

User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
Contact:

Post by haffax » Tue Mar 22, 2005 11:31 am

Thank you for finding it, but can you make a patch of it and submit it to the Patch Tracker, please. It might get lost otherwise. :)
0 x
team-pantheon programmer
creators of Rastullahs Lockenpracht

Post Reply