Index: GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrain.vcproj
===================================================================
--- GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrain.vcproj	(revision 2168)
+++ GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrain.vcproj	(revision 2171)
@@ -98,5 +98,5 @@
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="&quot;$(OGRE_PATH)\Dependencies\Lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\OgreMain\Lib\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\PlugIns\OctreeSceneManager\bin\$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)\Samples\Common\CEGUIRenderer\lib&quot;;&quot;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\lib\$(ConfigurationName)&quot;;&quot;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\OGRE\lib\$(ConfigurationName)&quot;;&quot;..\..\..\..\..\Lib\Vis\OnlineCullingCHC\IVReader\lib\$(ConfigurationName)&quot;;..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;&quot;..\..\..\..\..\Lib\Vis\Preprocessing\lib\$(ConfigurationName)&quot;"
-				GenerateDebugInformation="TRUE"
+				GenerateDebugInformation="FALSE"
 				SubSystem="2"
 				OptimizeReferences="2"
Index: GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TerrainFrameListener.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TerrainFrameListener.cpp	(revision 2168)
+++ GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TerrainFrameListener.cpp	(revision 2171)
@@ -570,5 +570,5 @@
 												bool relativeVisibility, 
 												bool useItemBuffer)
-{Ogre::LogManager::getSingleton().logMessage("here225");
+{
 	int itemBufferMode = useItemBuffer ? mItemBufferMode : 0;
 	
@@ -579,6 +579,5 @@
 
 	// no visibility manager available => no visibility scene manager, return
-	GtpVisibility::VisibilityManager *visManager = NULL;
-	
+	GtpVisibility::VisibilityManager *visManager = NULL;	
 	if (!mSceneMgr->getOption("VisibilityManager", &visManager))
 	{
@@ -586,4 +585,5 @@
 		return;
 	}
+
 	GtpVisibility::HierarchyInterface *hierarchyInterface = NULL;
 	if (!mSceneMgr->getOption("HierarchyInterface", &hierarchyInterface))
@@ -592,10 +592,11 @@
 		return;
 	}
-Ogre::LogManager::getSingleton().logMessage("here663");
+
 	mQueryManager = new OcclusionQueriesQueryManager(hierarchyInterface,
-			mWindow->getViewport(0), queryModes, itemBufferMode);
-Ogre::LogManager::getSingleton().logMessage("here6699");
+													 mWindow->getViewport(0), 
+													 queryModes, 
+													 itemBufferMode);
+
 	//mQueryManager = new PlatformQueryManager(sm->GetHierarchyInterface(),	mWindow->getViewport(0), false);
-
 
 	visManager->SetQueryManager(mQueryManager);
@@ -604,17 +605,20 @@
 	GtpVisibility::MeshInfoContainer visibleGeometry;
 	GtpVisibility::PatchInfoContainer visiblePatches;
-Ogre::LogManager::getSingleton().logMessage("here999");
 
 	if (fromPoint)
-	{Ogre::LogManager::getSingleton().logMessage("her11e5");
-		mQueryManager->
-			ComputeFromPointVisibility(mCamNode->getPosition(), &visibleNodes, 
-									   &visibleGeometry, &visiblePatches, relativeVisibility);
+	{
+		mQueryManager->ComputeFromPointVisibility(mCamNode->getPosition(), 
+												  &visibleNodes, 
+												  &visibleGeometry, 
+												  &visiblePatches, 
+												  relativeVisibility);
 	}
 	else
 	{
-		Ogre::LogManager::getSingleton().logMessage("here995");
 		mQueryManager->ComputeCameraVisibility(*mCamera,
-			    &visibleNodes, &visibleGeometry, &visiblePatches, relativeVisibility);
+											   &visibleNodes, 
+											   &visibleGeometry, 
+											   &visiblePatches, 
+											   relativeVisibility);
 	}
 		
@@ -630,5 +634,5 @@
 	int geomSize = 0, nodesSize = 0, patchSize = 0;
 
-	///////////////////////////////////////////////////////////////////////////
+	/////////////////
 	//-- apply queries on geometry level
 
@@ -654,8 +658,6 @@
 
 
-
-	///////////////////////////////////////////////////////////////////////////
+	////////////////
 	//-- apply queries on node level
-
 
 	GtpVisibility::NodeInfoContainer::iterator nodesIt, nodesIt_end = visibleNodes.end();
@@ -678,5 +680,5 @@
 
 
-	///////////////////////////////////////////////////////////////////////////
+	////////////////
 	//-- apply queries on patch level
 
@@ -1249,6 +1251,14 @@
 void TerrainFrameListener::toggleShowViewCells()
 {
-	mShowViewCells = !mShowViewCells;
-	mSceneMgr->setOption("ShowViewCells", &mShowViewCells);
+	if (0) // tmp matt
+	{
+		mShowViewCells = !mShowViewCells;
+		mSceneMgr->setOption("ShowViewCells", &mShowViewCells);
+	}
+	else 
+	{
+		unsigned int numObjects;
+		mSceneMgr->getOption("VisibleObjects", &numObjects);
+	}
 }
 //-----------------------------------------------------------------------
