Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 5, 2011, 5:31:27 PM (13 years ago)
Author:
landauf
Message:

added new graphics menu

Location:
code/branches/usability/src/libraries/core
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/usability/src/libraries/core/CMakeLists.txt

    r7966 r8018  
    8080    Game.h
    8181    GameMode.h
     82    GraphicsManager.h
    8283    GUIManager.h
    8384    Loader.h
  • code/branches/usability/src/libraries/core/GraphicsManager.cc

    r8008 r8018  
    480480    }
    481481
     482    unsigned int GraphicsManager::getWindowWidth() const
     483    {
     484        return this->renderWindow_->getWidth();
     485    }
     486
     487    unsigned int GraphicsManager::getWindowHeight() const
     488    {
     489        return this->renderWindow_->getHeight();
     490    }
     491
    482492    bool GraphicsManager::hasVSyncEnabled() const
    483493    {
    484494        Ogre::ConfigOptionMap& options = ogreRoot_->getRenderSystem()->getConfigOptions();
    485         if (options.find("VSync") != options.end())
    486             return (options["VSync"].currentValue == "Yes");
     495        Ogre::ConfigOptionMap::iterator it = options.find("VSync");
     496        if (it != options.end())
     497            return (it->second.currentValue == "Yes");
    487498        else
    488499            return false;
     500    }
     501
     502    std::string GraphicsManager::getFSAAMode() const
     503    {
     504        Ogre::ConfigOptionMap& options = ogreRoot_->getRenderSystem()->getConfigOptions();
     505        Ogre::ConfigOptionMap::iterator it = options.find("FSAA");
     506        if (it != options.end())
     507            return it->second.currentValue;
     508        else
     509            return "";
    489510    }
    490511
  • code/branches/usability/src/libraries/core/GraphicsManager.h

    r7995 r8018  
    5454#include "OrxonoxClass.h"
    5555
     56// tolua_begin
    5657namespace orxonox
    5758{
     
    6061        Graphics engine manager class
    6162    */
    62     class _CoreExport GraphicsManager : public Singleton<GraphicsManager>, public OrxonoxClass, public Ogre::LogListener
    63     {
     63    class _CoreExport GraphicsManager
     64// tolua_end
     65        : public Singleton<GraphicsManager>, public OrxonoxClass, public Ogre::LogListener
     66    { // tolua_export
    6467        friend class Singleton<GraphicsManager>;
    6568    public:
     
    7477        Ogre::RenderWindow* getRenderWindow() { return this->renderWindow_; }
    7578        size_t getRenderWindowHandle();
     79
     80// tolua_begin
     81        static GraphicsManager& getInstance() { return Singleton<GraphicsManager>::getInstance(); } // tolua_export
     82
    7683        bool isFullScreen() const;
     84        unsigned int getWindowWidth() const;
     85        unsigned int getWindowHeight() const;
     86
    7787        bool hasVSyncEnabled() const;
     88        std::string getFSAAMode() const;
     89// tolua_end
    7890
    7991        void upgradeToGraphics();
     
    127139
    128140        static GraphicsManager* singletonPtr_s;        //!< Pointer to the Singleton
     141// tolua_begin
    129142    };
    130143}
     144// tolua_end
    131145
    132146#endif /* _GraphicsManager_H__ */
Note: See TracChangeset for help on using the changeset viewer.