Changeset 2025 for GTP/trunk/App/Demos/Illum/Ogre/src/PRMDemo
- Timestamp:
- 01/23/07 08:57:19 (18 years ago)
- Location:
- GTP/trunk/App/Demos/Illum/Ogre/src/PRMDemo
- Files:
-
- 1 added
- 2 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/src/PRMDemo/include/PRMDemo.h
r1132 r2025 57 57 { 58 58 59 public:60 virtual void go(void)61 {62 if (!setup())63 return;64 59 65 renderScene(); 66 67 // clean up 68 destroyScene(); 69 } 60 70 61 71 62 protected: 72 63 SceneNode* kupolaNode; 73 64 SceneNode* mainLightNode; 74 75 void renderScene(){ 76 77 mWindow->resetStatistics(); 78 while(true){ 79 80 81 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 82 // Pump events on Win32 83 MSG msg; 84 while( PeekMessage( &msg, NULL, 0U, 0U, PM_REMOVE ) ) 85 { 86 TranslateMessage( &msg ); 87 DispatchMessage( &msg ); 88 } 89 90 #endif 91 92 if(!mRoot->_fireFrameStarted()){ 93 break; 94 } 95 unsigned long framenum = mRoot->getCurrentFrameNumber(); 96 97 OgreIlluminationManager::getSingleton().update(framenum, mWindow); 98 99 //mRoot->renderOneFrame(); 100 mRoot->_updateAllRenderTargets(); 101 102 mRoot->_fireFrameEnded(); 103 104 } 65 66 void loadResources(void) 67 { 68 // Initialise, parse scripts etc 69 ResourceGroupManager::getSingleton().initialiseResourceGroup("Bootstrap"); 70 ResourceGroupManager::getSingleton().initialiseResourceGroup("General"); 71 ResourceGroupManager::getSingleton().initialiseResourceGroup("PostProc"); 105 72 } 106 73 107 74 void createPostproc() 108 { 75 { 109 76 CompositorManager::getSingleton().addCompositor(mWindow->getViewport(0), 110 "G ameTools/Glow");77 "GTP/PostProc/Glow"); 111 78 CompositorManager::getSingleton().setCompositorEnabled(mWindow->getViewport(0), 112 "GameTools/Glow", true); 79 "GTP/PostProc/Glow", true); 80 81 CompositorManager::getSingleton().addCompositor(mWindow->getViewport(0), 82 "GTP/PostProc/ToneMap"); 83 CompositorManager::getSingleton().setCompositorEnabled(mWindow->getViewport(0), 84 "GTP/PostProc/ToneMap", true); 113 85 } 114 86 … … 183 155 mFrameListener= new PRMDemoFrameListener(mWindow, 184 156 mCamera ); 185 mRoot->addFrameListener(mFrameListener); 186 157 mFrameListener->setPriority(1); 158 mRoot->addFrameListener(mFrameListener); 159 OgreIlluminationManager::getSingleton().setPriority(2); 160 mRoot->addFrameListener(&OgreIlluminationManager::getSingleton()); 187 161 } 188 162
Note: See TracChangeset
for help on using the changeset viewer.