RenderTarget::~RenderTarget() { // make a copy of the list to avoid crashes, the viewport destructor change the list ViewportList vlist = mViewportList; // Delete viewports for (ViewportList::iterator i = vlist.begin(); i != vlist.end(); ++i) { fireViewportRemoved(i->second); OGRE_DELETE (*i).second; } //DepthBuffer keeps track of us, avoid a dangling pointer detachDepthBuffer(); // Write closing message LogManager::getSingleton().stream(LML_TRIVIAL) << "Render Target '" << mName << "' " << "Average FPS: " << mStats.avgFPS << " " << "Best FPS: " << mStats.bestFPS << " " << "Worst FPS: " << mStats.worstFPS; }
//----------------------------------------------------------------------- void RenderTarget::removeViewport(int ZOrder) { ViewportList::iterator it = mViewportList.find(ZOrder); if (it != mViewportList.end()) { fireViewportRemoved((*it).second); OGRE_DELETE (*it).second; mViewportList.erase(ZOrder); } }
void RenderTarget::removeAllViewports(void) { for (ViewportList::iterator it = mViewportList.begin(); it != mViewportList.end(); ++it) { fireViewportRemoved(it->second); OGRE_DELETE (*it).second; } mViewportList.clear(); }
void RenderTarget::removeAllViewports(void) { // make a copy of the list to avoid crashes, the viewport destructor change the list ViewportList vlist = mViewportList; for (ViewportList::iterator it = vlist.begin(); it != vlist.end(); ++it) { fireViewportRemoved(it->second); OGRE_DELETE (*it).second; } mViewportList.clear(); }
RenderTarget::~RenderTarget() { // Delete viewports for (ViewportList::iterator i = mViewportList.begin(); i != mViewportList.end(); ++i) { fireViewportRemoved(i->second); OGRE_DELETE (*i).second; } // Write closing message LogManager::getSingleton().stream(LML_TRIVIAL) << "Render Target '" << mName << "' " << "Average FPS: " << mStats.avgFPS << " " << "Best FPS: " << mStats.bestFPS << " " << "Worst FPS: " << mStats.worstFPS; }
RenderTarget::~RenderTarget() { // Delete viewports for (ViewportList::iterator i = mViewportList.begin(); i != mViewportList.end(); ++i) { fireViewportRemoved(i->second); delete (*i).second; } // Write closing message StringUtil::StrStreamType msg; msg << "Render Target '" << mName << "' " << "Average FPS: " << mStats.avgFPS << " " << "Best FPS: " << mStats.bestFPS << " " << "Worst FPS: " << mStats.worstFPS; LogManager::getSingleton().logMessage(msg.str()); }