Revision: 1753 http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=1753&view=rev Author: rorthomas Date: 2011-03-13 00:57:13 +0000 (Sun, 13 Mar 2011)
Log Message: ----------- framework updates Modified Paths: -------------- trunk/source/main/framework/AdvancedOgreFramework.cpp trunk/source/main/framework/AdvancedOgreFramework.h trunk/source/main/framework/AppStateManager.cpp trunk/source/main/main_editor/RoREditor.cpp trunk/source/main/main_editor/RoREditor.h Modified: trunk/source/main/framework/AdvancedOgreFramework.cpp =================================================================== --- trunk/source/main/framework/AdvancedOgreFramework.cpp 2011-03-13 00:42:35 UTC (rev 1752) +++ trunk/source/main/framework/AdvancedOgreFramework.cpp 2011-03-13 00:57:13 UTC (rev 1753) @@ -148,11 +148,6 @@ return true; } -void OgreFramework::updateOgre(Real timeSinceLastFrame) -{ - if(m_pRoot) - m_pRoot->renderOneFrame(timeSinceLastFrame); -} void OgreFramework::resized(Ogre::Vector2 size) { Modified: trunk/source/main/framework/AdvancedOgreFramework.h =================================================================== --- trunk/source/main/framework/AdvancedOgreFramework.h 2011-03-13 00:42:35 UTC (rev 1752) +++ trunk/source/main/framework/AdvancedOgreFramework.h 2011-03-13 00:57:13 UTC (rev 1753) @@ -30,7 +30,6 @@ ~OgreFramework(); bool initOgre(Ogre::String name, unsigned int hwnd, unsigned int mainhwnd); - void updateOgre(Ogre::Real timeSinceLastFrame); void resized(Ogre::Vector2 size); Ogre::Root* m_pRoot; Modified: trunk/source/main/framework/AppStateManager.cpp =================================================================== --- trunk/source/main/framework/AppStateManager.cpp 2011-03-13 00:42:35 UTC (rev 1752) +++ trunk/source/main/framework/AppStateManager.cpp 2011-03-13 00:57:13 UTC (rev 1753) @@ -70,12 +70,14 @@ //||||||||||||||||||||||||||||||||||||||||||||||| void AppStateManager::update(double dt) { +#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_LINUX + Ogre::WindowEventUtilities::messagePump(); +#endif if(OgreFramework::getSingletonPtr()->m_pRenderWnd->isClosed()) m_bShutdown = true; m_ActiveStateStack.back()->update(dt); - OgreFramework::getSingletonPtr()->updateOgre(dt); OgreFramework::getSingletonPtr()->m_pRoot->renderOneFrame(); } @@ -89,9 +91,6 @@ while(!m_bShutdown) { startTime = OgreFramework::getSingletonPtr()->m_pTimer->getMillisecondsCPU(); -#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_LINUX - Ogre::WindowEventUtilities::messagePump(); -#endif if(OgreFramework::getSingletonPtr()->m_pRenderWnd->isActive()) { update(timeSinceLastFrame); Modified: trunk/source/main/main_editor/RoREditor.cpp =================================================================== --- trunk/source/main/main_editor/RoREditor.cpp 2011-03-13 00:42:35 UTC (rev 1752) +++ trunk/source/main/main_editor/RoREditor.cpp 2011-03-13 00:57:13 UTC (rev 1753) @@ -29,7 +29,6 @@ RoREditor::RoREditor(string _meshPath) { - timer = NULL; initialized=false; timeSinceLastFrame = 1; startTime = 0; @@ -44,13 +43,11 @@ if(!SETTINGS.setupPaths()) return false; - SETTINGS.setSetting("Preselected Truck", "none"); + SETTINGS.setSetting("Preselected Truck", "agoras.truck"); SETTINGS.setSetting("Preselected Map", "simple.terrn"); app = new RigsOfRods("RoREditor", Ogre::StringConverter::parseInt(hwndStr), Ogre::StringConverter::parseInt(mainhwndStr)); - timer = new Ogre::Timer(); - app->go(); return true; @@ -60,8 +57,6 @@ { if (!initialized) return; - if(timer) delete timer; - initialized = false; } Modified: trunk/source/main/main_editor/RoREditor.h =================================================================== --- trunk/source/main/main_editor/RoREditor.h 2011-03-13 00:42:35 UTC (rev 1752) +++ trunk/source/main/main_editor/RoREditor.h 2011-03-13 00:57:13 UTC (rev 1753) @@ -52,9 +52,6 @@ int timeSinceLastFrame; int startTime; - - - Ogre::Timer* timer; }; #endif //RORVIEWER_H__ \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ Rigsofrods-devel mailing list Rigsofrods-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel