From: <qr...@us...> - 2006-12-10 15:19:53
|
Revision: 299 http://svn.sourceforge.net/opengate/?rev=299&view=rev Author: qrstuvw Date: 2006-12-10 07:19:53 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Typo fix - should produce a blank screen Modified Paths: -------------- trunk/current/src/client/GraphicsSetup.cpp Modified: trunk/current/src/client/GraphicsSetup.cpp =================================================================== --- trunk/current/src/client/GraphicsSetup.cpp 2006-12-10 13:59:42 UTC (rev 298) +++ trunk/current/src/client/GraphicsSetup.cpp 2006-12-10 15:19:53 UTC (rev 299) @@ -20,18 +20,18 @@ #include "GraphicsSetup.h" +//--------------------------------------------------------------------------------// /** Defaul constructor. */ -//--------------------------------------------------------------------------------// GraphicsSetup::GraphicsSetup() {} +//--------------------------------------------------------------------------------// /** Default destructor. */ -//--------------------------------------------------------------------------------// GraphicsSetup::~GraphicsSetup() {} +//--------------------------------------------------------------------------------// /** This function initialises Ogre and CEGUI. */ -//--------------------------------------------------------------------------------// bool GraphicsSetup::initGraphics(framework_info* mFramework) { // Create root object and store a pointer to it in mFramework @@ -46,12 +46,13 @@ // Create the Graphics.xml file using default options if (!saveEngineSettings(mFramework)) return false; - return false; + if (!loadEngineSettings(mFramework)) + return false; } // Write all the currently available settings as comment - if (!saveEngineSettings(mFramework)) - return false; + //if (!saveEngineSettings(mFramework)) + // return false; // Load all resources from XML if (!setupResources()) @@ -69,21 +70,21 @@ // Pick a scene manager mFramework->sceneMgr = mFramework->ogreRoot->createSceneManager(Ogre::ST_GENERIC, "SMInstance"); - // Setup CEGUI Logging - CEGUI::Logger::getSingleton().setLoggingLevel(CEGUI::Insane); - CEGUI::Logger::getSingleton().setLogFilename("OpenGate.log", true); - // Tell CEGUI about our window and what scene manager to use mFramework->GUIRenderer = new CEGUI::OgreCEGUIRenderer(mFramework->renderWindow, Ogre::RENDER_QUEUE_OVERLAY, false, 3000, mFramework->sceneMgr); // Hook the CEGUI system to the renderer mFramework->GUISystem = new CEGUI::System(mFramework->GUIRenderer); + // Setup CEGUI Logging + CEGUI::Logger::getSingleton().setLoggingLevel(CEGUI::Insane); + CEGUI::Logger::getSingleton().setLogFilename("OpenGate.log", true); + return true; } +//--------------------------------------------------------------------------------// /** Get all the options from Graphics.xml and feed them to the RenderSystem. */ -//--------------------------------------------------------------------------------// bool GraphicsSetup::loadEngineSettings(framework_info* mFramework) { TiXmlDocument doc( "Graphics.xml" ); @@ -99,7 +100,7 @@ pElem = hRoot.FirstChild( "Subsystem" ).FirstChild().Element(); mRenderSystem = mFramework->ogreRoot->getRenderSystemByName(pElem->Attribute("value")); - for (pElem = hRoot.FirstChild( "GraphicsSetup" ).FirstChild().Element(); pElem != 0; pElem = pElem->NextSiblingElement()) + for (pElem = hRoot.FirstChild( "Graphics" ).FirstChild().Element(); pElem != 0; pElem = pElem->NextSiblingElement()) { mRenderSystem->setConfigOption(pElem->Attribute("name"), pElem->Attribute("value")); } @@ -107,8 +108,8 @@ return true; } +//--------------------------------------------------------------------------------// /** (re)Create Graphics.xml with options taken from the current RenderSystem. */ -//--------------------------------------------------------------------------------// bool GraphicsSetup::saveEngineSettings(framework_info* mFramework) { int i; @@ -174,8 +175,8 @@ return true; } +//--------------------------------------------------------------------------------// /** Create and populate resource groups from Resources.xml. */ -//--------------------------------------------------------------------------------// bool GraphicsSetup::setupResources() { TiXmlDocument doc( "Resources.xml" ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qr...@us...> - 2006-12-10 16:17:26
|
Revision: 302 http://svn.sourceforge.net/opengate/?rev=302&view=rev Author: qrstuvw Date: 2006-12-10 08:17:27 -0800 (Sun, 10 Dec 2006) Log Message: ----------- Dunno whats changed Modified Paths: -------------- trunk/current/src/client/GraphicsSetup.cpp Modified: trunk/current/src/client/GraphicsSetup.cpp =================================================================== --- trunk/current/src/client/GraphicsSetup.cpp 2006-12-10 16:16:24 UTC (rev 301) +++ trunk/current/src/client/GraphicsSetup.cpp 2006-12-10 16:17:27 UTC (rev 302) @@ -116,7 +116,7 @@ std::string s; TiXmlElement* _option; TiXmlDocument doc; - TiXmlDeclaration* _decl = new TiXmlDeclaration( "1.0", "UTF-8", "No" ); + TiXmlDeclaration* _decl = new TiXmlDeclaration( "1.0", "UTF-8", "yes" ); doc.LinkEndChild( _decl ); TiXmlElement* _root = new TiXmlElement( "OpenGate" ); doc.LinkEndChild( _root ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |