Index: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/scripts/OgreIllumModule.7.10.vcproj
===================================================================
--- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/scripts/OgreIllumModule.7.10.vcproj	(revision 2143)
+++ GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/scripts/OgreIllumModule.7.10.vcproj	(revision 2174)
@@ -21,5 +21,5 @@
 				Optimization="0"
 				ImproveFloatingPointConsistency="TRUE"
-				AdditionalIncludeDirectories="&quot;$(OGRE_PATH)\Samples\Common\include&quot;;&quot;$(OGRE_PATH)\OgreMain\include&quot;;..\include;..\include\RenderingRuns;..\include\RenderTechniques;..\..\IllumModule\include;..\..\IllumModule\include\RenderingRuns;..\..\IllumModule\include\RenderTechniques;&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\include\&quot;"
+				AdditionalIncludeDirectories="&quot;$(OGRE_PATH)\Samples\Common\include&quot;;&quot;$(OGRE_PATH)\OgreMain\include&quot;;..\include;..\include\RenderingRuns;..\include\RenderTechniques;..\..\IllumModule\include;..\..\IllumModule\include\RenderingRuns;..\..\IllumModule\include\RenderTechniques"
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;GAMETOOLS_ILLUMINATION_MODULE;GTP_VISIBILITY_MODIFIED_OGRE"
 				MinimalRebuild="TRUE"
@@ -36,6 +36,6 @@
 			<Tool
 				Name="VCLibrarianTool"
-				AdditionalDependencies="IllumModule.lib OgreMain_d.lib Plugin_OctreeSceneManager.lib"
-				AdditionalLibraryDirectories="..\..\IllumModule\bin\Debug;&quot;$(OGRE_PATH)\OgreMain\lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\$(ConfigurationName)&quot;"/>
+				AdditionalDependencies="IllumModule.lib OgreMain_d.lib"
+				AdditionalLibraryDirectories="..\..\IllumModule\bin\Debug;&quot;$(OGRE_PATH)\OgreMain\lib\$(ConfigurationName)&quot;"/>
 			<Tool
 				Name="VCMIDLTool"/>
@@ -75,5 +75,5 @@
 				OptimizeForProcessor="2"
 				OptimizeForWindowsApplication="TRUE"
-				AdditionalIncludeDirectories="&quot;$(OGRE_PATH)\Samples\Common\include&quot;;&quot;$(OGRE_PATH)\OgreMain\include&quot;;..\include;..\include\RenderingRuns;..\include\RenderTechniques;..\..\IllumModule\include;..\..\IllumModule\include\RenderingRuns;..\..\IllumModule\include\RenderTechniques;&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\include\&quot;"
+				AdditionalIncludeDirectories="&quot;$(OGRE_PATH)\Samples\Common\include&quot;;&quot;$(OGRE_PATH)\OgreMain\include&quot;;..\include;..\include\RenderingRuns;..\include\RenderTechniques;..\..\IllumModule\include;..\..\IllumModule\include\RenderingRuns;..\..\IllumModule\include\RenderTechniques;&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\include\&quot;;..\..\..\..\Vis\OnlineCullingCHC\OGRE\include"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;GAMETOOLS_ILLUMINATION_MODULE;GTP_VISIBILITY_MODIFIED_OGRE"
 				StringPooling="TRUE"
@@ -91,6 +91,6 @@
 			<Tool
 				Name="VCLibrarianTool"
-				AdditionalDependencies="IllumModule.lib OgreMain.lib Plugin_OctreeSceneManager.lib"
-				AdditionalLibraryDirectories="..\..\IllumModule\bin\Release;&quot;$(OGRE_PATH)\OgreMain\lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\$(ConfigurationName)&quot;"/>
+				AdditionalDependencies="IllumModule.lib OgreMain.lib Plugin_OctreeSceneManager.lib Plugin_VisibilitySceneManager.lib"
+				AdditionalLibraryDirectories="..\..\IllumModule\bin\Release;&quot;$(OGRE_PATH)\OgreMain\lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\$(ConfigurationName)&quot;;&quot;..\..\..\..\Vis\OnlineCullingCHC\OGRE\lib\$(ConfigurationName)&quot;"/>
 			<Tool
 				Name="VCMIDLTool"/>
Index: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/OgreRenderingRun.cpp
===================================================================
--- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/OgreRenderingRun.cpp	(revision 1725)
+++ GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/OgreRenderingRun.cpp	(revision 2174)
@@ -173,7 +173,8 @@
 	}
 
-	sm->_findVisibleObjects (cam, shadowcastersonly);
-	
-	setMaterialForRenderables(materialName, rq, solidsonly);
+	//sm->_findVisibleObjectsOC(cam, cam->getViewport(), false, true, shadowcastersonly);
+	sm->_findVisibleObjects(cam, shadowcastersonly);
+	
+	setMaterialForRenderables(materialName, sm->getRenderQueue(), solidsonly);
 }
 
Index: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgreCubeMapRenderingRun.cpp
===================================================================
--- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgreCubeMapRenderingRun.cpp	(revision 2055)
+++ GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/RenderingRuns/OgreCubeMapRenderingRun.cpp	(revision 2174)
@@ -69,5 +69,5 @@
 	Vector3 center = sharedRuns->getRootPosition(cubemapRunType);
 	cam->setPosition(center);
-
+	
 	bool renderAllwithOwnColor = false;
 
@@ -83,4 +83,34 @@
 			if(useEnvMaterial)
 			{
+/////////////////////////////////////////////////////////////////
+////   DEBUG
+/////////////////////////////////////////////////////////////////
+/*		Camera* camm = new Camera("tempCAm", sm);
+		TexturePtr texPtr = Ogre::TextureManager::getSingleton().createManual(	"tempRT", 
+																			"default",
+																			TEX_TYPE_2D,
+																			256,
+																			256,
+																			0,
+																			0,
+																			PF_FLOAT16_RGBA,
+																			TU_RENDERTARGET);
+		camm->setPosition(0,50,0);
+		camm->setAspectRatio(1);
+		camm->setFOVy(Radian(Degree(90)));
+		camm->setNearClipDistance(0.1);
+		camm->setFarClipDistance(1000);
+		Texture* result = texPtr.getPointer();
+		HardwarePixelBuffer* hpb = (result->getBuffer()).getPointer();
+		RenderTarget* rt = hpb->getRenderTarget(0);
+		Viewport* v = rt->addViewport(camm);
+		v->setOverlaysEnabled(false);
+		rt->setAutoUpdated(false);
+		
+		int cnt = sm->_findVisibleObjectsOC(camm, v, false, true, false);
+		int cnt2 = sm->_findVisibleObjectsOC(cam, v, false, true, false);
+		int cnt3 = sm->_findVisibleObjectsOC(camm, cam->getViewport(), false, true, false);
+		int cnt3 = sm->_findVisibleObjectsOC(cam, cam->getViewport(), false, true, false);*/
+///////////////////////////////////////////////////
 				setMaterialForVisibles(environmentMaterial, cam);
 				//sm->_queueSkiesForRendering(cam);				
@@ -88,4 +118,5 @@
 			else
 			{
+				//sm->_findVisibleObjectsOC(cam, rt->getViewport(0), false, true, false);
 				sm->_findVisibleObjects(cam, false);
 				sm->_queueSkiesForRendering(cam);
Index: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/OgreIlluminationManager.cpp
===================================================================
--- GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/OgreIlluminationManager.cpp	(revision 2166)
+++ GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/src/OgreIlluminationManager.cpp	(revision 2174)
@@ -3,5 +3,4 @@
 #include "OgreBillboardParticleRenderer.h"
 #include "SpriteParticleRenderer.h"
- 
 
 OgreIlluminationManager* OgreIlluminationManager::instance = NULL;
@@ -402,5 +401,7 @@
 		}
 		
-		sceneManager->_findVisibleObjects(rt->getViewport(i)->getCamera(),false);
+		//sceneManager->_findVisibleObjectsOC(rt->getViewport(i)->getCamera(), rt->getViewport(i), false, true, false);
+		sceneManager->_findVisibleObjects(rt->getViewport(i)->getCamera(), false);
+		
 		fillVisibleList(rq);	
 
