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 | |
---|
9 | namespace 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 | */ |
---|
14 | class _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 | |
---|
26 | protected:
|
---|
27 | OgreBase *mOgreBase;
|
---|
28 | Ogre::Root *mRoot;
|
---|
29 | Ogre::SceneManager* mSceneMgr;
|
---|
30 | Ogre::Camera* mCamera;
|
---|
31 | OgreFrameListener* mFrameListener;
|
---|
32 | Ogre::RenderWindow* mWindow; |
---|
33 | |
---|
34 | // These internal methods package up the stages in the startup process
|
---|
35 | /** Sets up the application - returns false if the user chooses to abandon configuration. */
|
---|
36 | virtual bool setup(bool createOgreRoot, Ogre::String applicationName, unsigned int width, unsigned int height, bool isFullScreen);
|
---|
37 | |
---|
38 | /** Configures the application - returns false if the user chooses to abandon configuration. */
|
---|
39 | virtual bool configure(bool createOgreRoot, Ogre::String applicationName, unsigned int width, unsigned int height, bool isFullScreen);
|
---|
40 | |
---|
41 | virtual void createFrameListener(void);
|
---|
42 | |
---|
43 | /// Method which will define the source of resources (other than current folder)
|
---|
44 | virtual void setupResources(void); |
---|
45 | |
---|
46 | /// Optional override method where you can create resource listeners (e.g. for loading screens)
|
---|
47 | virtual void createResourceListener(void);
|
---|
48 | |
---|
49 | /// Optional override method where you can perform resource group loading
|
---|
50 | /// Must at least do ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
|
---|
51 | virtual void loadResources(void); |
---|
52 | |
---|
53 | }; |
---|
54 | |
---|
55 | } |
---|
56 | #endif |
---|