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