Index: GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrain.vcproj
===================================================================
--- GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrain.vcproj	(revision 2130)
+++ GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrain.vcproj	(revision 2168)
@@ -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="FALSE"
+				GenerateDebugInformation="TRUE"
 				SubSystem="2"
 				OptimizeReferences="2"
Index: GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TerrainFrameListener.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TerrainFrameListener.cpp	(revision 2145)
+++ GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TerrainFrameListener.cpp	(revision 2168)
@@ -570,5 +570,5 @@
 												bool relativeVisibility, 
 												bool useItemBuffer)
-{
+{Ogre::LogManager::getSingleton().logMessage("here225");
 	int itemBufferMode = useItemBuffer ? mItemBufferMode : 0;
 	
@@ -581,14 +581,19 @@
 	GtpVisibility::VisibilityManager *visManager = NULL;
 	
-	if (!mSceneMgr->getOption("VisibilityManager", visManager))
+	if (!mSceneMgr->getOption("VisibilityManager", &visManager))
+	{
+		Ogre::LogManager::getSingleton().logMessage("no vismanager found");
 		return;
-
+	}
 	GtpVisibility::HierarchyInterface *hierarchyInterface = NULL;
-	if (!mSceneMgr->getOption("HierarchyInterface", hierarchyInterface))
+	if (!mSceneMgr->getOption("HierarchyInterface", &hierarchyInterface))
+	{
+		Ogre::LogManager::getSingleton().logMessage("no hierarchy interface found");
 		return;
-
+	}
+Ogre::LogManager::getSingleton().logMessage("here663");
 	mQueryManager = new OcclusionQueriesQueryManager(hierarchyInterface,
 			mWindow->getViewport(0), queryModes, itemBufferMode);
-
+Ogre::LogManager::getSingleton().logMessage("here6699");
 	//mQueryManager = new PlatformQueryManager(sm->GetHierarchyInterface(),	mWindow->getViewport(0), false);
 
@@ -599,8 +604,8 @@
 	GtpVisibility::MeshInfoContainer visibleGeometry;
 	GtpVisibility::PatchInfoContainer visiblePatches;
-
+Ogre::LogManager::getSingleton().logMessage("here999");
 
 	if (fromPoint)
-	{
+	{Ogre::LogManager::getSingleton().logMessage("her11e5");
 		mQueryManager->
 			ComputeFromPointVisibility(mCamNode->getPosition(), &visibleNodes, 
@@ -609,4 +614,5 @@
 	else
 	{
+		Ogre::LogManager::getSingleton().logMessage("here995");
 		mQueryManager->ComputeCameraVisibility(*mCamera,
 			    &visibleNodes, &visibleGeometry, &visiblePatches, relativeVisibility);
@@ -1520,11 +1526,16 @@
 
 	case KC_F5:
-		applyVisibilityQuery(false, mShiftPressed, mUseItemBuffer);
-		break;
+		{
+			const bool fromPoint = false;
+			applyVisibilityQuery(fromPoint, mShiftPressed, mUseItemBuffer);
+			break;
+		}
 
 	case KC_F6:
-		applyVisibilityQuery(true, mShiftPressed, mUseItemBuffer);
-		break;
-	
+		{
+			const bool fromPoint = true;
+			applyVisibilityQuery(fromPoint, mShiftPressed, mUseItemBuffer);
+			break;
+		}	
 	case KC_F7:
 		++ mCurrentObjectType;
@@ -1534,5 +1545,6 @@
 
 	case KC_F8:
-		{	// generate new objects
+		{	
+			// generate new objects
 			const int objNum = 500;
 			mApplication->generateScene(objNum, mCurrentObjectType);
@@ -1550,5 +1562,6 @@
 		break;
 	
-	
+	case KC_F12:
+		break;
 	//KEY_PRESSED(KC_F3, 0.3, writeFrames());
 	//KEY_PRESSED(KC_F4, 0.3, loadFrames());
Index: GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrainApplication.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrainApplication.cpp	(revision 2130)
+++ GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TestCullingTerrainApplication.cpp	(revision 2168)
@@ -530,9 +530,6 @@
 	mTerrainContentGenerator = new TerrainContentGenerator(mSceneMgr);
 		
-	if (!msShowHillyTerrain)
-		return;
-
 	// if no objects in file, we generate new objects
-	if (!mTerrainContentGenerator->LoadObjects("objects.out"))
+	if (msShowHillyTerrain && !mTerrainContentGenerator->LoadObjects("objects.out"))
 	{
 		// the objects are generated randomly distributed over the terrain
Index: GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TerrainFrameListener.h
===================================================================
--- GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TerrainFrameListener.h	(revision 2145)
+++ GTP/trunk/App/Demos/Vis/HillyTerrain/OGRE/TerrainFrameListener.h	(revision 2168)
@@ -373,5 +373,6 @@
 	bool mStatsOn;
 	bool mLMouseDown;
-	bool mRMouseDown;     // True if the mouse buttons are down
+	// True if the mouse buttons are down
+	bool mRMouseDown;    
 	bool mShutdownRequested;
 	bool mDisplayCameraDetails;
