source: GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/OBA/OBAOgreApplication.h @ 900

Revision 900, 1.8 KB checked in by igarcia, 18 years ago (diff)
Line 
1#ifndef _OBAOGREAPPLICATION_H
2#define _OBAOGREAPPLICATION_H
3
4#include <OBAPrerequisites.h>
5#include <OBAOgreBase.h>
6#include <OBAOgreFrameListener.h>
7#include <OBAOgreApplication.h>
8
9namespace OBA {
10
11/** Base class which manages the standard startup of an Ogre application.
12    Designed to be subclassed for specific examples if required.
13*/
14class _OBAExport OgreApplication {
15  public:
16
17    /// Standard constructor
18    OgreApplication();
19
20        /// Standard destructor
21        virtual ~OgreApplication();
22
23    /// Start the example
24    virtual void go(void);
25
26protected:
27        OgreBase *mOgreBase;
28        Ogre::Root *mRoot;
29    Ogre::Camera* mCamera;
30    OgreFrameListener* mFrameListener;
31        Ogre::RenderWindow* mWindow;
32
33    // These internal methods package up the stages in the startup process
34    /** Sets up the application - returns false if the user chooses to abandon configuration. */
35    virtual bool setup(bool createOgreRoot, Ogre::String applicationName, unsigned int width, unsigned int height, bool isFullScreen);
36 
37    /** Configures the application - returns false if the user chooses to abandon configuration. */
38    virtual bool configure(bool createOgreRoot, Ogre::String applicationName, unsigned int width, unsigned int height, bool isFullScreen);
39   
40    virtual void createFrameListener(void);
41 
42        /// Method which will define the source of resources (other than current folder)
43        virtual void setupResources(void);
44
45        /// Optional override method where you can create resource listeners (e.g. for loading screens)
46        virtual void createResourceListener(void);
47       
48        /// Optional override method where you can perform resource group loading
49        /// Must at least do ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
50        virtual void loadResources(void);
51
52};
53
54}
55#endif
Note: See TracBrowser for help on using the repository browser.