Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 6, 2008, 7:39:38 PM (16 years ago)
Author:
rgrieder
Message:

Moved all Ogre related code from GSRoot to GSGraphics.
You should now be able to start the gui, goto ioConsole, then start the gui again and load the level.
gui —> level —> gui doesn't yet work. But I will not dig into that until our object hierarchy has been replaced.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/gamestates/GSGraphics.h

    r1878 r1891  
    3939namespace orxonox
    4040{
    41     class _OrxonoxExport GSGraphics : public GameState<GSRoot>, public OrxonoxClass, public Ogre::WindowEventListener
     41    class _OrxonoxExport GSGraphics : public GameState<GSRoot>, public OrxonoxClass,
     42                                      public Ogre::WindowEventListener, public Ogre::LogListener
    4243    {
    4344        friend class ClassIdentifier<GSGraphics>;
     45
    4446    public:
    4547        GSGraphics();
    4648        ~GSGraphics();
    4749
    48         Ogre::Viewport* getViewport() { return this->viewport_; }
    49         GUIManager* getGUIManager() { return this->guiManager_; }
     50        Ogre::Root*     getOgreRoot()   { return this->ogreRoot_  ; }
     51        Ogre::Viewport* getViewport()   { return this->viewport_  ; }
     52        GUIManager*     getGUIManager() { return this->guiManager_; }
    5053
    51     private:
     54    private: // functions
    5255        void enter();
    5356        void leave();
     
    5659        void setConfigValues();
    5760
     61        void setupOgre();
    5862        void declareResources();
    5963        void loadRenderer();
    6064        void initialiseResources();
    6165
     66        // console commands
    6267        void printScreen();
     68
     69        // event from Ogre::LogListener
     70        void messageLogged(const std::string& message, Ogre::LogMessageLevel lml,
     71            bool maskDebug, const std::string& logName);
    6372
    6473        // window events from Ogre::WindowEventListener
     
    6877        void windowClosed      (Ogre::RenderWindow* rw);
    6978
    70         Ogre::Root*           ogreRoot_;
     79    private: // variables
    7180        Ogre::RenderWindow*   renderWindow_;          //!< the current render window
    7281        Ogre::Viewport*       viewport_;              //!< default full size viewport
     
    7685        InGameConsole*        console_;
    7786        GUIManager*           guiManager_;
     87        Ogre::Root*           ogreRoot_;                  //!< Ogre's root
     88        Ogre::LogManager*     ogreLogger_;
     89        GraphicsEngine*       graphicsEngine_;   //!< Interface to Ogre
    7890
    7991        KeyBinder*            masterKeyBinder_;
     
    88100        // config values
    89101        std::string           resourceFile_;          //!< resources file name
     102        std::string           ogreConfigFile_;        //!< ogre config file name
     103        std::string           ogrePluginsFile_;       //!< ogre plugins file name
     104        std::string           ogreLogFile_;           //!< log file name for Ogre log messages
     105        int                   ogreLogLevelTrivial_;   //!< Corresponding Orxonx debug level for LL_TRIVIAL
     106        int                   ogreLogLevelNormal_;    //!< Corresponding Orxonx debug level for LL_NORMAL
     107        int                   ogreLogLevelCritical_;  //!< Corresponding Orxonx debug level for LL_CRITICAL
    90108        unsigned int          detailLevelParticle_;   //!< Detail level of particle effects (0: off, 1: low, 2: normal, 3: high)
    91109    };
Note: See TracChangeset for help on using the changeset viewer.