Index: /GTP/trunk/App/Demos/Illum/Ogre/src/HierarchicalSystem/include/HierarchicalSystem.h
===================================================================
--- /GTP/trunk/App/Demos/Illum/Ogre/src/HierarchicalSystem/include/HierarchicalSystem.h	(revision 2301)
+++ /GTP/trunk/App/Demos/Illum/Ogre/src/HierarchicalSystem/include/HierarchicalSystem.h	(revision 2426)
@@ -26,5 +26,5 @@
 #include "SpriteParticleRenderer.h"
 
-
+bool visibilitySM = false;
 int scene = 1;
 
@@ -80,4 +80,5 @@
 		ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Basic");
 		//ResourceGroupManager::getSingleton().initialiseResourceGroup("PostProc");
+		ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Basic");
 		ResourceGroupManager::getSingleton().initialiseResourceGroup("GTP_Particles");
 	}
@@ -98,19 +99,19 @@
 	void chooseSceneManager()
 	{
-		if(scene == 1)
+		if(visibilitySM)
+			mSceneMgr = mRoot->createSceneManager("OcclusionCullingSceneManager");
+		else
 		{
-		  mSceneMgr = mRoot->createSceneManager("OctreeSceneManager");
-		  //mSceneMgr = mRoot->createSceneManager("OcclusionCullingSceneManager");
-		}
-		else if(scene == 2)
-           mSceneMgr = mRoot->createSceneManager("TerrainSceneManager");
+
+			if(scene == 1)
+				mSceneMgr = mRoot->createSceneManager("OctreeSceneManager");
+			else if(scene == 2)
+				mSceneMgr = mRoot->createSceneManager("TerrainSceneManager");		  
+		}		
+
 	}
-
 	void createScene(void)
     {
-		//createPostproc();
-		std::string occlusion_cfg("OcclusionCulling.cfg");
-		//mSceneMgr->setWorldGeometry(occlusion_cfg);
-		
+	
 		OgreIlluminationManager::getSingleton().setMainCamera(mCamera);
 		OgreIlluminationManager::getSingleton().setMainViewport(mWindow->getViewport(0));
@@ -131,7 +132,7 @@
 		
 
-	//	OgreIlluminationManager::getSingleton().createGlobalRun(ILLUMRUN_PHASE_TEXTURE);
-	//	OgreIlluminationManager::getSingleton().updateGlobalRun(ILLUMRUN_PHASE_TEXTURE, 1);
-	//	OgreIlluminationManager::getSingleton().savePhaseTextureToFile("phase.dds");
+		//OgreIlluminationManager::getSingleton().createGlobalRun(ILLUMRUN_PHASE_TEXTURE);
+		//OgreIlluminationManager::getSingleton().updateGlobalRun(ILLUMRUN_PHASE_TEXTURE, 1);
+		//OgreIlluminationManager::getSingleton().savePhaseTextureToFile("phase.dds");
 
 		
@@ -142,5 +143,5 @@
 
 
-		OgreIlluminationManager::getSingleton().initTechniques();
+	OgreIlluminationManager::getSingleton().initTechniques();
 
    }
@@ -148,4 +149,8 @@
    void createScene1()
    {
+	    std::string occlusion_cfg("OcclusionCulling.cfg");
+		if(visibilitySM)
+		mSceneMgr->setWorldGeometry(occlusion_cfg);
+
 	   mCamera->setPosition(0,150,100);
 	   mCamera->setDirection(0,0,-1);
@@ -164,4 +169,5 @@
 
        ParticleSystem* pSys1 = mSceneMgr->createParticleSystem("psys1", "GTP/HPS/Smoke_Large");
+	   //ParticleSystem* pSys1 = mSceneMgr->createParticleSystem("psys1", "GTP/Smoke_Large");
 	   pSys1->setKeepParticlesInLocalSpace(false);
 	   SceneNode *pSysNode = rootNode->createChildSceneNode("psys1");
@@ -190,12 +196,34 @@
 
 	   SceneNode* rootNode = mSceneMgr->getRootSceneNode();
-	   std::string terrain_cfg("terrain.cfg");
-	   mSceneMgr -> setWorldGeometry( terrain_cfg );
-
-	   ParticleSystem* pSys1 = mSceneMgr->createParticleSystem("psys1", "GameTools/FogBig");
+	   if(visibilitySM)
+	   {
+		 std::string terrain_cfg("VisTerrain.cfg");
+	     mSceneMgr -> setWorldGeometry( terrain_cfg );
+	   }
+	   else
+	   {
+		   std::string terrain_cfg("terrain.cfg");
+		   mSceneMgr -> setWorldGeometry( terrain_cfg );	   
+	   }
+
+	   ParticleSystem* pSys1 = mSceneMgr->createParticleSystem("psys1", "GTP/HPS/Smoke_Large");
 	   pSys1->setKeepParticlesInLocalSpace(false);
 	   SceneNode *pSysNode = rootNode->createChildSceneNode("psys1");
 	   pSysNode->attachObject(pSys1);
 	   pSysNode->setPosition(600,-50,600);
+
+	   //Init lights
+		Light* mainLight = mSceneMgr->createLight("MainLight");
+		mainLight->setType(Light::LT_POINT);
+        mainLight->setDiffuseColour(ColourValue::White);
+		mainLight->setSpecularColour(ColourValue::White);
+		mainLightNode = rootNode->createChildSceneNode();
+		mainLightNode->setPosition(0,500,0);
+		mainLight->setPosition(mainLightNode->getWorldPosition());
+		mainLightNode->attachObject(mainLight); 
+		BillboardSet* bbs = mSceneMgr->createBillboardSet("bb", 1);
+		bbs->createBillboard(Vector3::ZERO, ColourValue::White);
+		bbs->setMaterialName("Flare");
+		mainLightNode->attachObject(bbs);
 		
    }
