Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 10, 2008, 5:03:34 PM (16 years ago)
Author:
bknecht
Message:

merged back that script-branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/GraphicsEngine.h

    r790 r1021  
    1010#include <string>
    1111
     12#include <OgrePrerequisites.h>
    1213#include <OgreRoot.h>
    1314#include <OgreSceneManager.h>
    1415
    1516#include "OrxonoxPrereqs.h"
     17#include "core/OrxonoxClass.h"
    1618
    1719
     
    2123   * graphics engine manager class
    2224 */
    23   class _OrxonoxExport GraphicsEngine {
     25  class _OrxonoxExport GraphicsEngine : public OrxonoxClass
     26  {
    2427    public:
    2528      GraphicsEngine();
    2629      inline void setConfigPath(std::string path) { this->configPath_ = path; };
    2730      // find a better way for this
    28       inline Ogre::Root* getRoot() { return root_; };
     31      //inline Ogre::Root* getRoot() { return root_; };
     32      void setConfigValues();
    2933      void setup();
    30       bool load();
     34      bool load(std::string path);
    3135      void loadRessourceLocations(std::string path);
    3236      Ogre::SceneManager* getSceneManager();
    33       void startRender();
     37      void initialise();
     38
     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(); }
    3452
    3553      virtual ~GraphicsEngine();
     54
    3655    private:
    3756      Ogre::Root*         root_;        //!< Ogre's root
     
    3958      std::string         dataPath_;    //!< path to data file
    4059      Ogre::SceneManager* scene_;       //!< scene manager of the game
     60      Ogre::RenderWindow* renderWindow_;//!< the current render window
     61      //bool               bOverwritePath_; //!< overwrites path
    4162
    4263  };
Note: See TracChangeset for help on using the changeset viewer.