Changeset 1032 for code/trunk/src/orxonox/GraphicsEngine.h
- Timestamp:
- Apr 12, 2008, 4:08:29 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/GraphicsEngine.h
r1024 r1032 12 12 #include <OgrePrerequisites.h> 13 13 #include <OgreLog.h> 14 #include <OgreRoot.h>15 #include <OgreSceneManager.h>16 14 17 15 #include "OrxonoxPrereqs.h" … … 21 19 namespace orxonox { 22 20 23 /**24 * graphics engine manager class25 */21 /** 22 @brief Graphics engine manager class 23 */ 26 24 class _OrxonoxExport GraphicsEngine : public OrxonoxClass, public Ogre::LogListener 27 25 { 26 friend class ClassIdentifier<GraphicsEngine>; 28 27 public: 29 GraphicsEngine();30 28 void setConfigPath(std::string path) { this->configPath_ = path; }; 31 // find a better way for this32 //inline Ogre::Root* getRoot() { return root_; };33 29 void setConfigValues(); 34 30 void setup(); … … 37 33 Ogre::SceneManager* getSceneManager(); 38 34 void initialise(); 35 void destroy(); 39 36 40 37 // several window properties … … 44 41 int getWindowHeight() const; 45 42 46 // Ogre Root access for Orxonox 47 void frameStarted(Ogre::FrameEvent &evt) 48 { if (root_) root_->_fireFrameStarted(evt); } 49 void frameEnded (Ogre::FrameEvent &evt) 50 { if (root_) root_->_fireFrameEnded(evt); } 51 void renderOneFrame() 52 { if (root_) root_->_updateAllRenderTargets(); } 53 54 virtual ~GraphicsEngine(); 43 static GraphicsEngine& getSingleton(); 55 44 56 45 private: 46 // don't mess with singletons 47 GraphicsEngine(); 48 GraphicsEngine(GraphicsEngine&) { } 49 ~GraphicsEngine(); 50 57 51 //! Method called by the LogListener from Ogre 58 void messageLogged(const std::string& message, Ogre::LogMessageLevel lml,59 bool maskDebug, const std::string &logName);52 void messageLogged(const std::string&, Ogre::LogMessageLevel, 53 bool, const std::string&); 60 54 61 55 Ogre::Root* root_; //!< Ogre's root 62 std::string configPath_; //!< path to config file63 std::string dataPath_; //!< path to data file64 56 Ogre::SceneManager* scene_; //!< scene manager of the game 65 57 Ogre::RenderWindow* renderWindow_;//!< the current render window 66 58 //bool bOverwritePath_; //!< overwrites path 59 std::string configPath_; //!< path to config file 60 std::string dataPath_; //!< path to data file 67 61 std::string ogreLogfile_; //!< log file name for Ogre log messages 68 62 int ogreLogLevelTrivial_; //!< Corresponding Orxonx debug level for LL_TRIVIAL
Note: See TracChangeset
for help on using the changeset viewer.