Changeset 2179 for GTP/trunk/App/Demos/Illum/Ogre/src/PRMDemo
- Timestamp:
- 03/01/07 18:04:37 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/src/PRMDemo/include/PRMDemo.h
r2175 r2179 96 96 void createScene(void) 97 97 { 98 createPostproc(); 98 //std::string occlusion_cfg("OcclusionCulling.cfg"); 99 //mSceneMgr->setWorldGeometry(occlusion_cfg); 100 101 //createPostproc(); 99 102 100 103 OgreIlluminationManager::getSingleton().setMainCamera(mCamera); 101 104 OgreIlluminationManager::getSingleton().setMainViewport(mWindow->getViewport(0)); 102 105 OgreIlluminationManager::getSingleton().setShadowMapSize(512); 106 OgreIlluminationManager::getSingleton().setShadowMapMaterialName("GameTools/ShadowMapDistance"); 107 OgreIlluminationManager::getSingleton().setFocusingSM(true); 108 OgreIlluminationManager::getSingleton().setShadowMapSize(512); 109 OgreIlluminationManager::getSingleton().setBlurShadowMap(false); 110 OgreIlluminationManager::getSingleton().setUseLISPSM(false); 103 111 104 112 Root::getSingleton()._setCurrentSceneManager(mSceneMgr); … … 113 121 mSceneMgr->setSkyBox(true, "Examples/EveningSkyBox", 500); 114 122 115 SceneNode* rootNode = mSceneMgr->getRootSceneNode(); 123 SceneNode* rootNode = mSceneMgr->getRootSceneNode(); 116 124 117 125 118 126 SceneSerializer s(mSceneMgr); 119 127 DataStreamPtr inputStream; 120 inputStream = ResourceGroupManager::getSingleton().openResource(" towers2.level");128 inputStream = ResourceGroupManager::getSingleton().openResource("level.txt"); //towers2.level 121 129 s.parseScript(inputStream, ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME); 122 123 /* Entity* tower = mSceneMgr->createEntity("tower","tower.mesh"); 124 SceneNode* tNode = rootNode->createChildSceneNode("tower"); 125 tNode->setScale(10,10,10); 126 tNode->attachObject(tower); 127 128 Entity* tower2 = mSceneMgr->createEntity("tower2","tower.mesh"); 129 tower2->setMaterialName("towermaterialBump"); 130 SceneNode* tNode2 = rootNode->createChildSceneNode("tower2"); 131 tNode2->setScale(10,10,10); 132 tNode2->setPosition(0,0,100); 133 tNode2->attachObject(tower2);*/ 134 135 /* Entity* tower3 = mSceneMgr->createEntity("tower3","tower.mesh"); 136 tower3->setMaterialName("towermaterialNoBump"); 137 SceneNode* tNode3 = rootNode->createChildSceneNode("tower3"); 138 tNode3->setPosition(0,0,-50); 139 tNode3->setScale(10,10,10); 140 tNode3->attachObject(tower3);*/ 141 142 /* Entity* lepcso = mSceneMgr->createEntity("lepcso","stairs.mesh"); 143 SceneNode* lNode = rootNode->createChildSceneNode("l"); 144 lNode->attachObject(lepcso);*/ 145 146 //createPlane("p","lambert1",Vector3(0,-20,0),Vector2(100,100)); 130 131 createPlane("p","GTP/Basic/ShadowReciever/Depth",Vector3(0,0,0),Vector2(1000,1000)); 147 132 148 133 Light* mainLight = mSceneMgr->createLight("MainLight"); 149 134 mainLight->setType(Light::LT_DIRECTIONAL); 135 mainLight->setCastShadows(true); 150 136 mainLight->setDiffuseColour(ColourValue::White); 151 137 mainLight->setSpecularColour(ColourValue::White); 152 138 mainLightNode = rootNode->createChildSceneNode(); 153 139 154 mainLightNode->setPosition(10 ,10,0);155 mainLight->setPosition(10 ,10,0);140 mainLightNode->setPosition(1000,1000,1000); 141 mainLight->setPosition(1000,1000,1000); 156 142 mainLight->setPowerScale(5); 157 143 mainLight->setDirection(-1,-1, -1);
Note: See TracChangeset
for help on using the changeset viewer.