Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 31, 2008, 2:37:00 PM (16 years ago)
Author:
rgrieder
Message:

Moved most of the GraphicsEngine code to GSRoot and GSGraphics.
GraphicsEngine is now more of a legacy object to ensure functionality until there is a new solution.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gui/src/orxonox/GraphicsEngine.h

    r1653 r1686  
    4242
    4343#include <OgrePrerequisites.h>
    44 #include <OgreLog.h>
    45 #include <OgreRenderWindow.h>
    46 #include <OgreWindowEventUtilities.h>
    4744#include "core/OrxonoxClass.h"
    4845
     
    5249    @brief Graphics engine manager class
    5350    */
    54     class _OrxonoxExport GraphicsEngine : public Ogre::WindowEventListener, public Ogre::LogListener, public OrxonoxClass
     51    class _OrxonoxExport GraphicsEngine : public OrxonoxClass
    5552    {
     53        // HACK: temporary means
     54        friend class GSGraphics;
     55
    5656    public:
    5757        GraphicsEngine();
     
    5959
    6060        void setConfigValues();
    61         void setup();
    62         void declareRessourceLocations();
    63         void loadRenderer();
    64         void initialiseResources();
    65         void createNewScene();
    6661
    6762        void setLevelSceneManager(Ogre::SceneManager* sceneMgr) { this->levelSceneManager_ = sceneMgr; }
     
    6964
    7065        Ogre::Viewport* getViewport() { return this->viewport_; }
     66        Ogre::Root*     getOgreRoot() { return this->root_; }
    7167
    7268        // several window properties
    73         Ogre::RenderWindow* getRenderWindow() { return this->renderWindow_; }
    74         size_t getWindowHandle();
    7569        int getWindowWidth() const;
    7670        int getWindowHeight() const;
     
    8175        void setAverageFramesPerSecond(float fps) { this->avgFramesPerSecond_ = fps; }
    8276
    83         void setWindowActivity(bool activity)
    84         { if (this->renderWindow_) this->renderWindow_->setActive(activity); }
    85 
    8677        inline unsigned int getDetailLevelParticle() const
    8778        { return this->detailLevelParticle_; }
    88 
    89         // console commands
    90         static void printScreen();
    9179
    9280        static GraphicsEngine& getInstance();
     
    9583    private:
    9684        // don't mess with singletons
    97         GraphicsEngine(GraphicsEngine&) { }
    98 
    99         //! Method called by the LogListener from Ogre
    100         void messageLogged(const std::string&, Ogre::LogMessageLevel,
    101             bool, const std::string&);
    102 
    103         // window events from Ogre::WindowEventListener
    104         void windowMoved       (Ogre::RenderWindow* rw);
    105         void windowResized     (Ogre::RenderWindow* rw);
    106         void windowFocusChanged(Ogre::RenderWindow* rw);
    107         void windowClosed      (Ogre::RenderWindow* rw);
     85        GraphicsEngine(GraphicsEngine&);
    10886
    10987        Ogre::Root*         root_;                  //!< Ogre's root
     
    11795
    11896        // config values
    119         std::string         resourceFile_;          //!< resources file name
    120         std::string         ogreConfigFile_;        //!< ogre config file name
    121         std::string         ogrePluginsFile_;       //!< ogre plugins file name
    122         std::string         ogreLogFile_;           //!< log file name for Ogre log messages
    123         int                 ogreLogLevelTrivial_;   //!< Corresponding Orxonx debug level for LL_TRIVIAL
    124         int                 ogreLogLevelNormal_;    //!< Corresponding Orxonx debug level for LL_NORMAL
    125         int                 ogreLogLevelCritical_;  //!< Corresponding Orxonx debug level for LL_CRITICAL
    12697        unsigned int        detailLevelParticle_;   //!< Detail level of particle effects (0: off, 1: low, 2: normal, 3: high)
    12798
Note: See TracChangeset for help on using the changeset viewer.