Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/orxonox/GraphicsEngine.h @ 1023

Last change on this file since 1023 was 1021, checked in by bknecht, 17 years ago

merged back that script-branch

File size: 1.8 KB
RevLine 
[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
[1021]12#include <OgrePrerequisites.h>
[612]13#include <OgreRoot.h>
14#include <OgreSceneManager.h>
15
[729]16#include "OrxonoxPrereqs.h"
[1021]17#include "core/OrxonoxClass.h"
[612]18
[729]19
[612]20namespace orxonox {
21
22/**
23   * graphics engine manager class
24 */
[1021]25  class _OrxonoxExport GraphicsEngine : public OrxonoxClass
26  {
[612]27    public:
28      GraphicsEngine();
[715]29      inline void setConfigPath(std::string path) { this->configPath_ = path; };
[612]30      // find a better way for this
[1021]31      //inline Ogre::Root* getRoot() { return root_; };
32      void setConfigValues();
[612]33      void setup();
[1021]34      bool load(std::string path);
[715]35      void loadRessourceLocations(std::string path);
[612]36      Ogre::SceneManager* getSceneManager();
[1021]37      void initialise();
[612]38
[1021]39      // several window properties
40      Ogre::RenderWindow* getRenderWindow() { return this->renderWindow_; }
41      size_t getWindowHandle();
42      int getWindowWidth() const;
43      int getWindowHeight() const;
44
45      // Ogre Root access for Orxonox
46      void frameStarted(Ogre::FrameEvent &evt)
47      { if (root_) root_->_fireFrameStarted(evt); }
48      void frameEnded  (Ogre::FrameEvent &evt)
49      { if (root_) root_->_fireFrameEnded(evt);   }
50      void renderOneFrame()
51      { if (root_) root_->_updateAllRenderTargets(); }
52
[612]53      virtual ~GraphicsEngine();
[1021]54
[612]55    private:
56      Ogre::Root*         root_;        //!< Ogre's root
[715]57      std::string         configPath_;  //!< path to config file
58      std::string         dataPath_;    //!< path to data file
[612]59      Ogre::SceneManager* scene_;       //!< scene manager of the game
[1021]60      Ogre::RenderWindow* renderWindow_;//!< the current render window
61      //bool               bOverwritePath_; //!< overwrites path
[612]62
63  };
64
65}
66
[673]67#endif /* _GraphicsEngine_H__ */
Note: See TracBrowser for help on using the repository browser.