#ifndef _OBAOGREAPPLICATION_H #define _OBAOGREAPPLICATION_H #include #include #include #include namespace OBA { /** Base class which manages the standard startup of an Ogre application. Designed to be subclassed for specific examples if required. */ class _OBAExport OgreApplication { public: /// Standard constructor OgreApplication(); /// Standard destructor virtual ~OgreApplication(); /// Start the example virtual void go(void); protected: OgreBase *mOgreBase; Ogre::Root *mRoot; Ogre::Camera* mCamera; Ogre::SceneManager* mSceneMgr; OgreFrameListener* mFrameListener; Ogre::RenderWindow* mWindow; // These internal methods package up the stages in the startup process /** Sets up the application - returns false if the user chooses to abandon configuration. */ virtual bool setup(bool createOgreRoot); /** Configures the application - returns false if the user chooses to abandon configuration. */ virtual bool configure(bool createOgreRoot); virtual void createFrameListener(void); /// Method which will define the source of resources (other than current folder) virtual void setupResources(void); /// Optional override method where you can create resource listeners (e.g. for loading screens) virtual void createResourceListener(void); /// Optional override method where you can perform resource group loading /// Must at least do ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); virtual void loadResources(void); }; } #endif