[612] | 1 | /** |
---|
[614] | 2 | @file GraphicsEngine.h |
---|
[612] | 3 | @brief Graphics Engine |
---|
| 4 | @author Benjamin Knecht <beni_at_orxonox.net> |
---|
| 5 | */ |
---|
| 6 | |
---|
[673] | 7 | #ifndef _GraphicsEngine_H__ |
---|
| 8 | #define _GraphicsEngine_H__ |
---|
[612] | 9 | |
---|
[715] | 10 | #include <string> |
---|
| 11 | |
---|
[612] | 12 | #include <OgreRoot.h> |
---|
| 13 | #include <OgreSceneManager.h> |
---|
| 14 | |
---|
[729] | 15 | #include "OrxonoxPrereqs.h" |
---|
[926] | 16 | #include "core/BaseObject.h" |
---|
[612] | 17 | |
---|
[729] | 18 | |
---|
[612] | 19 | namespace orxonox { |
---|
| 20 | |
---|
| 21 | /** |
---|
| 22 | * graphics engine manager class |
---|
| 23 | */ |
---|
[926] | 24 | class _OrxonoxExport GraphicsEngine : public BaseObject |
---|
| 25 | { |
---|
[612] | 26 | public: |
---|
| 27 | GraphicsEngine(); |
---|
[715] | 28 | inline void setConfigPath(std::string path) { this->configPath_ = path; }; |
---|
[612] | 29 | // find a better way for this |
---|
| 30 | inline Ogre::Root* getRoot() { return root_; }; |
---|
[926] | 31 | void setConfigValues(); |
---|
[612] | 32 | void setup(); |
---|
[926] | 33 | bool load(std::string path); |
---|
[715] | 34 | void loadRessourceLocations(std::string path); |
---|
[612] | 35 | Ogre::SceneManager* getSceneManager(); |
---|
| 36 | void startRender(); |
---|
| 37 | |
---|
[919] | 38 | // several window properties |
---|
| 39 | size_t getWindowHandle(); |
---|
| 40 | int getWindowWidth() const; |
---|
| 41 | int getWindowHeight() const; |
---|
| 42 | |
---|
[612] | 43 | virtual ~GraphicsEngine(); |
---|
| 44 | private: |
---|
| 45 | Ogre::Root* root_; //!< Ogre's root |
---|
[715] | 46 | std::string configPath_; //!< path to config file |
---|
| 47 | std::string dataPath_; //!< path to data file |
---|
[612] | 48 | Ogre::SceneManager* scene_; //!< scene manager of the game |
---|
[919] | 49 | Ogre::RenderWindow* renderWindow_;//!< the current render window |
---|
[926] | 50 | //bool bOverwritePath_; //!< overwrites path |
---|
[612] | 51 | |
---|
| 52 | }; |
---|
| 53 | |
---|
| 54 | } |
---|
| 55 | |
---|
[673] | 56 | #endif /* _GraphicsEngine_H__ */ |
---|