Changeset 1686 for code/branches/gui/src/orxonox/GraphicsEngine.h
- Timestamp:
- Aug 31, 2008, 2:37:00 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gui/src/orxonox/GraphicsEngine.h
r1653 r1686 42 42 43 43 #include <OgrePrerequisites.h> 44 #include <OgreLog.h>45 #include <OgreRenderWindow.h>46 #include <OgreWindowEventUtilities.h>47 44 #include "core/OrxonoxClass.h" 48 45 … … 52 49 @brief Graphics engine manager class 53 50 */ 54 class _OrxonoxExport GraphicsEngine : public O gre::WindowEventListener, public Ogre::LogListener, public OrxonoxClass51 class _OrxonoxExport GraphicsEngine : public OrxonoxClass 55 52 { 53 // HACK: temporary means 54 friend class GSGraphics; 55 56 56 public: 57 57 GraphicsEngine(); … … 59 59 60 60 void setConfigValues(); 61 void setup();62 void declareRessourceLocations();63 void loadRenderer();64 void initialiseResources();65 void createNewScene();66 61 67 62 void setLevelSceneManager(Ogre::SceneManager* sceneMgr) { this->levelSceneManager_ = sceneMgr; } … … 69 64 70 65 Ogre::Viewport* getViewport() { return this->viewport_; } 66 Ogre::Root* getOgreRoot() { return this->root_; } 71 67 72 68 // several window properties 73 Ogre::RenderWindow* getRenderWindow() { return this->renderWindow_; }74 size_t getWindowHandle();75 69 int getWindowWidth() const; 76 70 int getWindowHeight() const; … … 81 75 void setAverageFramesPerSecond(float fps) { this->avgFramesPerSecond_ = fps; } 82 76 83 void setWindowActivity(bool activity)84 { if (this->renderWindow_) this->renderWindow_->setActive(activity); }85 86 77 inline unsigned int getDetailLevelParticle() const 87 78 { return this->detailLevelParticle_; } 88 89 // console commands90 static void printScreen();91 79 92 80 static GraphicsEngine& getInstance(); … … 95 83 private: 96 84 // don't mess with singletons 97 GraphicsEngine(GraphicsEngine&) { } 98 99 //! Method called by the LogListener from Ogre 100 void messageLogged(const std::string&, Ogre::LogMessageLevel, 101 bool, const std::string&); 102 103 // window events from Ogre::WindowEventListener 104 void windowMoved (Ogre::RenderWindow* rw); 105 void windowResized (Ogre::RenderWindow* rw); 106 void windowFocusChanged(Ogre::RenderWindow* rw); 107 void windowClosed (Ogre::RenderWindow* rw); 85 GraphicsEngine(GraphicsEngine&); 108 86 109 87 Ogre::Root* root_; //!< Ogre's root … … 117 95 118 96 // config values 119 std::string resourceFile_; //!< resources file name120 std::string ogreConfigFile_; //!< ogre config file name121 std::string ogrePluginsFile_; //!< ogre plugins file name122 std::string ogreLogFile_; //!< log file name for Ogre log messages123 int ogreLogLevelTrivial_; //!< Corresponding Orxonx debug level for LL_TRIVIAL124 int ogreLogLevelNormal_; //!< Corresponding Orxonx debug level for LL_NORMAL125 int ogreLogLevelCritical_; //!< Corresponding Orxonx debug level for LL_CRITICAL126 97 unsigned int detailLevelParticle_; //!< Detail level of particle effects (0: off, 1: low, 2: normal, 3: high) 127 98
Note: See TracChangeset
for help on using the changeset viewer.