Changeset 2344 for GTP/trunk/App/Demos/Illum
- Timestamp:
- 05/03/07 11:31:23 (18 years ago)
- Location:
- GTP/trunk/App/Demos/Illum/Ogre/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/src/CausticTest/include/CausticTest.h
r2340 r2344 55 55 this->app = app; 56 56 } 57 void setAttr(SceneNode* lightNode, SceneNode* sphereNode, Light* l) 58 { 59 this->sphereNode = sphereNode; 60 this->lightNode = lightNode; 61 light = l; 62 } 57 63 bool processUnbufferedKeyInput(const FrameEvent& evt) 58 64 { … … 137 143 void LoadRes() 138 144 { 139 loadResources(); 145 setupResources(); 146 147 MaterialManager::getSingleton().initialise(); 148 149 ResourceGroupManager::getSingleton().initialiseResourceGroup("Bootstrap"); 150 ResourceGroupManager::getSingleton().initialiseResourceGroup("General"); 151 ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Basic"); 152 ResourceGroupManager::getSingleton().initialiseResourceGroup("PostProc"); 153 ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_EnvMap"); 154 ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Caustic"); 155 156 ResourceGroupManager::getSingleton().loadResourceGroup("Bootstrap"); 157 ResourceGroupManager::getSingleton().loadResourceGroup("General"); 158 ResourceGroupManager::getSingleton().loadResourceGroup("GTP_Basic"); 159 ResourceGroupManager::getSingleton().loadResourceGroup("PostProc"); 160 ResourceGroupManager::getSingleton().loadResourceGroup("GTP_EnvMap"); 161 ResourceGroupManager::getSingleton().loadResourceGroup("GTP_Caustic"); 162 140 163 } 141 164 void setupScene() … … 190 213 mRoot->addFrameListener(&OgreIlluminationManager::getSingleton()); 191 214 } 215 setFrameListenerAttr() 216 { 217 ((RaytraceDemoListener*) mFrameListener)->setAttr(mainLightNode, sphereNode, light); 218 } 219 void clearResources(void) 220 { 221 ResourceGroupManager::getSingleton().destroyResourceGroup("Bootstrap"); 222 ResourceGroupManager::getSingleton().destroyResourceGroup("General"); 223 ResourceGroupManager::getSingleton().destroyResourceGroup("GTP_Basic"); 224 ResourceGroupManager::getSingleton().destroyResourceGroup("PostProc"); 225 ResourceGroupManager::getSingleton().destroyResourceGroup("GTP_EnvMap"); 226 ResourceGroupManager::getSingleton().destroyResourceGroup("GTP_Caustic"); 227 228 229 } 192 230 193 231 protected: … … 203 241 void loadResources(void) 204 242 { 205 206 243 // Initialise, parse scripts etc 207 244 ResourceGroupManager::getSingleton().initialiseResourceGroup("Bootstrap"); -
GTP/trunk/App/Demos/Illum/Ogre/src/CausticTest/src/CausticTest.cpp
r2340 r2344 49 49 Root::getSingleton().removeFrameListener(&OgreIlluminationManager::getSingleton()); 50 50 Root::getSingleton()._getCurrentSceneManager()->clearScene(); 51 Root::getSingleton()._getCurrentSceneManager()->destroyAllParticleSystems(); 51 52 TextureManager::getSingleton().removeAll(); 52 53 MeshManager::getSingleton().removeAll(); 53 54 MaterialManager::getSingleton().removeAll(); 54 //} 55 //if (framecount == 120) 56 //{ 55 ParticleSystemManager::getSingleton().removeAllTemplates(); 56 app->clearResources(); 57 } 58 if (framecount == 120) 59 { 57 60 app->LoadRes(); 58 61 app->setupScene(); 62 app->setFrameListenerAttr(); 59 63 } 60 64 return result; -
GTP/trunk/App/Demos/Illum/Ogre/src/Moria/include/Moria.h
r2334 r2344 126 126 //mSceneMgr->setWorldGeometry(occlusion_cfg); 127 127 128 //createPostproc();128 createPostproc(); 129 129 130 130 OgreIlluminationManager::getSingleton().setMainCamera(mCamera);
Note: See TracChangeset
for help on using the changeset viewer.