From: <es...@us...> - 2009-08-09 11:35:15
|
Revision: 2724 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2724&view=rev Author: esuvs Date: 2009-08-09 11:35:08 +0000 (Sun, 09 Aug 2009) Log Message: ----------- Reverted accidental change. Modified Paths: -------------- trunk/QtOgreFramework/QtOgre/source/Application.cpp Modified: trunk/QtOgreFramework/QtOgre/source/Application.cpp =================================================================== --- trunk/QtOgreFramework/QtOgre/source/Application.cpp 2009-08-09 10:21:19 UTC (rev 2723) +++ trunk/QtOgreFramework/QtOgre/source/Application.cpp 2009-08-09 11:35:08 UTC (rev 2724) @@ -61,8 +61,8 @@ QObject::connect(mUpdateTimer, SIGNAL(timeout()), this, SLOT(update())); //On the test system, a value of one here gives a high frame rate and still allows //event prcessing to take place. A value of 0 doubles the frame rate but the mouse - //becomes jumpy. This property should probably be configurable. - mUpdateTimer->setInterval(20); + //becomes jumpy. This property is configerable via setUpdateInterval(). + mUpdateTimer->setInterval(1); //Load the settings file. If it doesn't exist it is created. mSettings = new QSettings("settings.ini", QSettings::IniFormat); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <es...@us...> - 2009-09-13 10:48:30
|
Revision: 2744 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2744&view=rev Author: esuvs Date: 2009-09-13 10:48:22 +0000 (Sun, 13 Sep 2009) Log Message: ----------- Fixed crash on pressing 'Cancel' from settings dialog. Modified Paths: -------------- trunk/QtOgreFramework/QtOgre/source/Application.cpp Modified: trunk/QtOgreFramework/QtOgre/source/Application.cpp =================================================================== --- trunk/QtOgreFramework/QtOgre/source/Application.cpp 2009-09-12 22:58:14 UTC (rev 2743) +++ trunk/QtOgreFramework/QtOgre/source/Application.cpp 2009-09-13 10:48:22 UTC (rev 2744) @@ -137,16 +137,19 @@ Application::~Application() { + if (mRoot) + { + delete mRoot; + mRoot = 0; + } + + //We delete the OgreWidget last because it + //owns the LogManager (through Qt's mechanism). if(mOgreWidget) { delete mOgreWidget; mOgreWidget = 0; } - if (mRoot) - { - delete mRoot; - mRoot = 0; - } } //////////////////////////////////////////////////////////////////////////////// This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <es...@us...> - 2010-09-01 20:03:54
|
Revision: 2965 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2965&view=rev Author: esuvs Date: 2010-09-01 20:03:48 +0000 (Wed, 01 Sep 2010) Log Message: ----------- Changed FPSDialog to use ToolTip rather than FramelessWindowHint. Modified Paths: -------------- trunk/QtOgreFramework/QtOgre/source/Application.cpp Modified: trunk/QtOgreFramework/QtOgre/source/Application.cpp =================================================================== --- trunk/QtOgreFramework/QtOgre/source/Application.cpp 2010-08-26 13:23:29 UTC (rev 2964) +++ trunk/QtOgreFramework/QtOgre/source/Application.cpp 2010-09-01 20:03:48 UTC (rev 2965) @@ -240,7 +240,7 @@ Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); } - mFPSDialog = new FPSDialog(mOgreWidget, Qt::FramelessWindowHint); + mFPSDialog = new FPSDialog(mOgreWidget, Qt::ToolTip); mFPSDialog->setWindowOpacity(settings()->value("System/DefaultWindowOpacity", 1.0).toDouble()); mFPSDialog->move(mainWidget()->geometry().topLeft() + QPoint(10,10)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <es...@us...> - 2010-11-13 13:16:35
|
Revision: 2976 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2976&view=rev Author: esuvs Date: 2010-11-13 13:16:29 +0000 (Sat, 13 Nov 2010) Log Message: ----------- Fixed some uninitialized variables. Modified Paths: -------------- trunk/QtOgreFramework/QtOgre/source/Application.cpp Modified: trunk/QtOgreFramework/QtOgre/source/Application.cpp =================================================================== --- trunk/QtOgreFramework/QtOgre/source/Application.cpp 2010-09-20 09:30:50 UTC (rev 2975) +++ trunk/QtOgreFramework/QtOgre/source/Application.cpp 2010-11-13 13:16:29 UTC (rev 2976) @@ -48,14 +48,27 @@ Application::Application(int& argc, char** argv, GameLogic* gameLogic, IgnoredConfigWarningMode ignoredConfigWarningMode) :QApplication(argc, argv) + ,mFPSDialog(0) + ,mGraphicsSettingsWidget(0) + ,mOgreWidget(0) + ,mSettingsDialog(0) + ,mInternalOgreLog(0) + ,mInternalOgreLogManager(0) + ,mLogManager(0) + ,mOgreLog(0) + ,mSystemLog(0) + ,mActiveRenderSystem(0) ,mOpenGLRenderSystem(0) ,mDirect3D9RenderSystem(0) + ,mRoot(0) ,mFrameCounter(0) + ,mGameLogic(gameLogic) + ,mAutoUpdateTimer(0) + ,mSettings(0) ,mAutoUpdateEnabled(true) ,mIsInitialised(false) ,mIgnoredConfigWarningMode(ignoredConfigWarningMode) { - mGameLogic = gameLogic; if(mGameLogic != 0) { mGameLogic->mApplication = this; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <es...@us...> - 2010-11-15 21:39:12
|
Revision: 2977 http://ogreaddons.svn.sourceforge.net/ogreaddons/?rev=2977&view=rev Author: esuvs Date: 2010-11-15 21:39:06 +0000 (Mon, 15 Nov 2010) Log Message: ----------- Better handling of when Ogre::Root cannot be created. Modified Paths: -------------- trunk/QtOgreFramework/QtOgre/source/Application.cpp Modified: trunk/QtOgreFramework/QtOgre/source/Application.cpp =================================================================== --- trunk/QtOgreFramework/QtOgre/source/Application.cpp 2010-11-13 13:16:29 UTC (rev 2976) +++ trunk/QtOgreFramework/QtOgre/source/Application.cpp 2010-11-15 21:39:06 UTC (rev 2977) @@ -101,7 +101,7 @@ mAutoUpdateTimer = new QTimer; QObject::connect(mAutoUpdateTimer, SIGNAL(timeout()), this, SLOT(update())); //On the test system, a value of one here gives a high frame rate and still allows - //event prcessing to take place. A value of 0 doubles the frame rate but the mouse + //event processing to take place. A value of 0 doubles the frame rate but the mouse //becomes jumpy. This property is configerable via setAutoUpdateInterval(). mAutoUpdateTimer->setInterval(1); @@ -113,14 +113,40 @@ //Logging should be initialised ASAP, and before Ogre::Root is created. initialiseLogging(); - //Create the root and load render system plugins. We do that here so that we know - //what render systems are available by the time we show the settings dialog. - //Note that the render system is not initialised until the user selects one. + //Create the Ogre::Root object. + qDebug("Creating Ogre::Root object..."); + try + { #ifdef QT_DEBUG - mRoot = new Ogre::Root("plugins_d.cfg"); + mRoot = new Ogre::Root("plugins_d.cfg"); #else - mRoot = new Ogre::Root("plugins.cfg"); + mRoot = new Ogre::Root("plugins.cfg"); #endif + qDebug("Ogre::Root created successfully."); + } + catch(Ogre::Exception& e) + { + QString error + ( + "Failed to create the Ogre::Root object. This is a fatal error and the " + "application will now exit. There are a few known reasons why this can occur:\n\n" + " 1) Ensure your plugins.cfg has the correct path to the plugins.\n" + " 2) In plugins.cfg, use unix style directorary serperators. I.e '/' rather than '\\'.\n" + " 3) If your plugins.cfg is trying to load the Direct3D plugin, make sure you have DirectX installed on your machine.\n\n" + "The message returned by Ogre was:\n\n" + ); + error += QString::fromStdString(e.getFullDescription().c_str()); + + qCritical(error.toAscii()); + showErrorMessageBox(error); + + //Not much else we can do here... + std::exit(1); + } + + //Load the render system plugins. We do that here so that we know what + //render systems are available by the time we show the settings dialog. + //Note that the render system is not initialised until the user selects one. mOpenGLRenderSystem = mRoot->getRenderSystemByName("OpenGL Rendering Subsystem"); mDirect3D9RenderSystem = mRoot->getRenderSystemByName("Direct3D9 Rendering Subsystem"); if(!(mOpenGLRenderSystem || mDirect3D9RenderSystem)) @@ -294,9 +320,7 @@ //Redirect Qt's logging system to our own mSystemLog = mLogManager->createLog("System"); qInstallMsgHandler(&qtMessageHandler); - qDebug("Debug test"); - qWarning("Warning test"); - qCritical("Critical test"); + qDebug("***System log initialised***"); //Redirect Ogre's logging system to our own //This has to all be done before creating the Root object. @@ -305,6 +329,8 @@ mInternalOgreLogManager = new Ogre::LogManager(); mInternalOgreLog = mInternalOgreLogManager->createLog("Ogre.log", false, true, true); mInternalOgreLog->addListener(this); + mOgreLog->logMessage("***Ogre log initialised and redirected by QtOgre framework.***", LL_DEBUG); + mOgreLog->logMessage("***Any further messages in this log come directly from Ogre.***", LL_DEBUG); } void Application::initialiseOgre(void) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |