Changeset 1671 for GTP/trunk/App/Demos/Illum/Ogre/src/HierarchicalSystem
- Timestamp:
- 10/23/06 23:28:16 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/src/HierarchicalSystem/include/HierarchicalSystem.h
r1535 r1671 65 65 66 66 public: 67 /* virtual void go(void)68 {69 if (!setup())70 return;71 67 72 renderScene();73 74 // clean up75 destroyScene();76 }77 */78 68 protected: 79 69 SceneNode* kupolaNode; 80 70 SceneNode* mainLightNode; 81 /*82 void renderScene(){83 84 mWindow->resetStatistics();85 while(true){86 71 87 88 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN3289 // Pump events on Win3290 MSG msg;91 while( PeekMessage( &msg, NULL, 0U, 0U, PM_REMOVE ) )92 {93 TranslateMessage( &msg );94 DispatchMessage( &msg );95 }96 97 #endif98 99 if(!mRoot->_fireFrameStarted()){100 break;101 }102 unsigned long framenum = mRoot->getCurrentFrameNumber();103 104 OgreIlluminationManager::getSingleton().update(framenum, mWindow);105 106 //mRoot->renderOneFrame();107 mRoot->_updateAllRenderTargets();108 109 mRoot->_fireFrameEnded();110 111 }112 }113 */114 72 void createPostproc() 115 73 { … … 120 78 } 121 79 80 virtual void chooseSceneManager(void) 81 { 82 // Get the SceneManager, in this case a generic one 83 mSceneMgr = mRoot->createSceneManager("TerrainSceneManager"); 84 } 122 85 123 86 void createScene(void) … … 127 90 OgreIlluminationManager::getSingleton().setMainCamera(mCamera); 128 91 OgreIlluminationManager::getSingleton().setMainViewport(mWindow->getViewport(0)); 129 92 93 std::string terrain_cfg("terrain.cfg"); 94 mSceneMgr -> setWorldGeometry( terrain_cfg ); 95 130 96 Root::getSingleton()._setCurrentSceneManager(mSceneMgr); 131 97 mCamera->setPosition(0,150,100); … … 160 126 //headNode->setScale(1.5,1.5,1.5); 161 127 AxisAlignedBox bbox = head->getBoundingBox(); 162 headNode->setPosition(0, 180,20);128 headNode->setPosition(0,80,20); 163 129 headNode->_updateBounds(); 164 130 … … 167 133 SceneNode *pSysNode = rootNode->createChildSceneNode("psys1"); 168 134 pSysNode->attachObject(pSys1); 169 pSysNode->setPosition(0, 100,0);135 pSysNode->setPosition(0,0,0); 170 136 171 137 //Init lights … … 196 162 mFrameListener= new ParticleDemoFrameListener(mWindow, 197 163 mCamera , mainLightNode); 198 mRoot->addFrameListener(mFrameListener); 164 mFrameListener->setPriority(1); 165 OgreIlluminationManager::getSingleton().setPriority(2); 166 mRoot->addFrameListener(mFrameListener); 199 167 mRoot->addFrameListener(&OgreIlluminationManager::getSingleton()); 200 168
Note: See TracChangeset
for help on using the changeset viewer.