00001 #ifndef __APP_3D_H 00002 #define __APP_3D_H 00003 00004 #include "AppInterface.h" 00005 00006 namespace Ogre 00007 { 00008 class Root; 00009 class Camera; 00010 class SceneManager; 00011 class RenderWindow; 00012 class Viewport; 00013 class SceneNode; 00014 class Math; 00015 class Overlay; 00016 class Viewport; 00017 } 00018 00019 class FadingTextList; 00020 00021 class App3D : public AppInterface 00022 { 00023 public: 00024 App3D(); 00025 virtual ~App3D(); 00026 virtual void PreConfigure(void); 00027 //virtual void StartupSound(int maxchannels, unsigned int flags, void *extradriverdata, unsigned logType, bool logActive=false); 00028 virtual bool Configure(void); 00029 // Note that Ogre is bugged - setting recursive to true just crashes 00030 virtual void PostConfigure(const char *defaultResourceConfigurationPath, bool recursive); 00031 virtual void InitSceneManager(Ogre::SceneManager *sm=0); 00032 virtual void InitGUIManager(void); 00033 virtual void InitCamera(Ogre::Camera *cam=0); 00034 virtual void InitViewport(Ogre::Viewport *vp=0); 00035 virtual void Update(AppTime curTimeMS,AppTime elapsedTimeMS); 00036 virtual void Render(AppTime curTimeMS); 00037 virtual void SetVisible(bool _isVisible); 00038 virtual bool IsVisible(void) const; 00039 virtual bool ShouldQuit(void) const; 00040 virtual void OnAppShutdown(void); 00041 virtual void SetState(int stateType, RunnableState* state); 00042 bool HasPixelShader2(void) const; 00043 // Returns filename written 00044 const char * TakeScreenshot(const char *prefix, const char *suffix); 00045 00046 Ogre::SceneManager* GetSceneManager(void) const; 00047 const char* GetWorkingDirectory(void) const; 00048 00049 Ogre::Root *root; 00050 Ogre::Camera* camera; 00051 Ogre::RenderWindow* window; 00052 Ogre::Viewport* viewport; 00053 // This is here because the math trig tables don't get initialize until Math is instantiated, even though the tables are static. 00054 Ogre::Math *math; 00055 //Ogre::SceneNode *gameplayNode; 00056 00057 protected: 00058 00059 Ogre::SceneManager* sceneManager; 00060 void UpdateDefault(AppTime curTimeMS,AppTime elapsedTimeMS); 00061 virtual char * GetWindowTitle(void) const=0; 00062 00063 bool isVisible; 00064 char workingDirectory[512]; 00065 bool hasPixelShader2; 00066 }; 00067 00068 #endif
1.7.1