Changeset 2186 for GTP/trunk/App/Demos/Illum/Ogre/src/PRMDemo
- Timestamp:
- 03/02/07 19:07:56 (18 years ago)
- Location:
- GTP/trunk/App/Demos/Illum/Ogre/src/PRMDemo
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/src/PRMDemo/include/PRMDemo.h
r2181 r2186 73 73 ResourceGroupManager::getSingleton().initialiseResourceGroup("PostProc"); 74 74 ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Demo"); 75 ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_PathMapDemo"); 75 76 } 76 77 … … 81 82 CompositorManager::getSingleton().setCompositorEnabled(mWindow->getViewport(0), 82 83 "GTP/PostProc/Glow", true); 83 84 /* 84 85 CompositorManager::getSingleton().addCompositor(mWindow->getViewport(0), 85 86 "GTP/PostProc/ToneMap"); 86 87 CompositorManager::getSingleton().setCompositorEnabled(mWindow->getViewport(0), 87 "GTP/PostProc/ToneMap", true); 88 "GTP/PostProc/ToneMap", true); */ 88 89 } 89 90 … … 93 94 //mSceneMgr = mRoot->createSceneManager("OcclusionCullingSceneManager"); 94 95 } 95 96 /* 96 97 void createScene(void) 97 98 { … … 99 100 //mSceneMgr->setWorldGeometry(occlusion_cfg); 100 101 101 //createPostproc();102 createPostproc(); 102 103 103 104 OgreIlluminationManager::getSingleton().setMainCamera(mCamera); … … 126 127 SceneSerializer s(mSceneMgr); 127 128 DataStreamPtr inputStream; 128 inputStream = ResourceGroupManager::getSingleton().openResource("towers 2.level"); //towers2.level129 inputStream = ResourceGroupManager::getSingleton().openResource("towers.level"); //towers2.level 129 130 s.parseScript(inputStream, ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME); 130 131 131 createPlane("p","GTP/Basic/ShadowReciever/Depth",Vector3(0,-0.3,0),Vector2(150,150)); 132 //createPlane("p","groundmaterial",Vector3(0,-0.3,0),Vector2(150,150)); 133 134 Light* mainLight = mSceneMgr->createLight("MainLight"); 135 mainLight->setType(Light::LT_DIRECTIONAL); 136 mainLight->setCastShadows(true); 137 mainLight->setDiffuseColour(ColourValue::White); 138 mainLight->setSpecularColour(ColourValue::White); 139 mainLightNode = rootNode->createChildSceneNode(); 140 141 mainLightNode->setPosition(1000,1000,1000); 142 mainLight->setPosition(1000,1000,1000); 143 mainLight->setPowerScale(5); 144 mainLight->setDirection(-1,-1, -1); 145 mainLightNode->attachObject(mainLight); 146 147 OgreIlluminationManager::getSingleton().initTechniques(); 148 }*/ 149 150 void createScene(void) 151 { 152 //std::string occlusion_cfg("OcclusionCulling.cfg"); 153 //mSceneMgr->setWorldGeometry(occlusion_cfg); 154 155 createPostproc(); 156 157 OgreIlluminationManager::getSingleton().setMainCamera(mCamera); 158 OgreIlluminationManager::getSingleton().setMainViewport(mWindow->getViewport(0)); 159 OgreIlluminationManager::getSingleton().setShadowMapSize(512); 160 OgreIlluminationManager::getSingleton().setShadowMapMaterialName("GTP/Basic/DepthCCW"); 161 OgreIlluminationManager::getSingleton().setFocusingSM(true); 162 OgreIlluminationManager::getSingleton().setShadowMapSize(700); 163 OgreIlluminationManager::getSingleton().setBlurShadowMap(true); 164 OgreIlluminationManager::getSingleton().setUseLISPSM(true); 165 166 Root::getSingleton()._setCurrentSceneManager(mSceneMgr); 167 mCamera->setPosition(0,0,0); 168 //mCamera->setPosition(0,100,0); 169 //mCamera->lookAt(0,-1,0); 170 mCamera->setFOVy(Radian(Degree(80))); 171 mCamera->setNearClipDistance(0.01); 172 mCamera->setFarClipDistance(1000); 173 // Set ambient light 174 mSceneMgr->setAmbientLight(ColourValue(0.1, 0.1, 0.1)); 175 mSceneMgr->setSkyBox(true, "Examples/EveningSkyBox", 500); 176 177 SceneNode* rootNode = mSceneMgr->getRootSceneNode(); 178 179 180 SceneSerializer s(mSceneMgr); 181 DataStreamPtr inputStream; 182 inputStream = ResourceGroupManager::getSingleton().openResource("processed.level"); //towers2.level 183 s.parseScript(inputStream, ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME); 184 s.parseEntryPoints("prmEntryPoints.text"); 185 186 //createPlane("p","GTP/Basic/ShadowReciever/Depth",Vector3(0,-0.3,0),Vector2(150,150)); 132 187 133 188 Light* mainLight = mSceneMgr->createLight("MainLight"); -
GTP/trunk/App/Demos/Illum/Ogre/src/PRMDemo/scripts/PRMDemo.7.10.vcproj
r2141 r2186 150 150 RelativePath="..\include\PRMDemo.h"> 151 151 </File> 152 <Filter 153 Name="Common" 154 Filter=""> 155 <File 156 RelativePath="..\..\Common\src\SceneSerializer.cpp"> 157 </File> 158 <File 159 RelativePath="..\..\Common\include\SceneSerializer.h"> 160 </File> 161 </Filter> 152 162 </Filter> 153 163 <Filter … … 161 171 </File> 162 172 </Filter> 163 <Filter164 Name="Common"165 Filter="">166 <File167 RelativePath="..\..\Common\src\SceneSerializer.cpp">168 </File>169 <File170 RelativePath="..\..\Common\include\SceneSerializer.h">171 </File>172 </Filter>173 173 </Files> 174 174 <Globals>
Note: See TracChangeset
for help on using the changeset viewer.