Changeset 8018 for code/branches/usability/src/libraries
- Timestamp:
- Mar 5, 2011, 5:31:27 PM (14 years ago)
- Location:
- code/branches/usability/src/libraries/core
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/usability/src/libraries/core/CMakeLists.txt
r7966 r8018 80 80 Game.h 81 81 GameMode.h 82 GraphicsManager.h 82 83 GUIManager.h 83 84 Loader.h -
code/branches/usability/src/libraries/core/GraphicsManager.cc
r8008 r8018 480 480 } 481 481 482 unsigned int GraphicsManager::getWindowWidth() const 483 { 484 return this->renderWindow_->getWidth(); 485 } 486 487 unsigned int GraphicsManager::getWindowHeight() const 488 { 489 return this->renderWindow_->getHeight(); 490 } 491 482 492 bool GraphicsManager::hasVSyncEnabled() const 483 493 { 484 494 Ogre::ConfigOptionMap& options = ogreRoot_->getRenderSystem()->getConfigOptions(); 485 if (options.find("VSync") != options.end()) 486 return (options["VSync"].currentValue == "Yes"); 495 Ogre::ConfigOptionMap::iterator it = options.find("VSync"); 496 if (it != options.end()) 497 return (it->second.currentValue == "Yes"); 487 498 else 488 499 return false; 500 } 501 502 std::string GraphicsManager::getFSAAMode() const 503 { 504 Ogre::ConfigOptionMap& options = ogreRoot_->getRenderSystem()->getConfigOptions(); 505 Ogre::ConfigOptionMap::iterator it = options.find("FSAA"); 506 if (it != options.end()) 507 return it->second.currentValue; 508 else 509 return ""; 489 510 } 490 511 -
code/branches/usability/src/libraries/core/GraphicsManager.h
r7995 r8018 54 54 #include "OrxonoxClass.h" 55 55 56 // tolua_begin 56 57 namespace orxonox 57 58 { … … 60 61 Graphics engine manager class 61 62 */ 62 class _CoreExport GraphicsManager : public Singleton<GraphicsManager>, public OrxonoxClass, public Ogre::LogListener 63 { 63 class _CoreExport GraphicsManager 64 // tolua_end 65 : public Singleton<GraphicsManager>, public OrxonoxClass, public Ogre::LogListener 66 { // tolua_export 64 67 friend class Singleton<GraphicsManager>; 65 68 public: … … 74 77 Ogre::RenderWindow* getRenderWindow() { return this->renderWindow_; } 75 78 size_t getRenderWindowHandle(); 79 80 // tolua_begin 81 static GraphicsManager& getInstance() { return Singleton<GraphicsManager>::getInstance(); } // tolua_export 82 76 83 bool isFullScreen() const; 84 unsigned int getWindowWidth() const; 85 unsigned int getWindowHeight() const; 86 77 87 bool hasVSyncEnabled() const; 88 std::string getFSAAMode() const; 89 // tolua_end 78 90 79 91 void upgradeToGraphics(); … … 127 139 128 140 static GraphicsManager* singletonPtr_s; //!< Pointer to the Singleton 141 // tolua_begin 129 142 }; 130 143 } 144 // tolua_end 131 145 132 146 #endif /* _GraphicsManager_H__ */
Note: See TracChangeset
for help on using the changeset viewer.