Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/src/QueryManager.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/src/QueryManager.cpp	(revision 174)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/src/QueryManager.cpp	(revision 2280)
@@ -4,5 +4,5 @@
 namespace GtpVisibility {
  
-QueryManager::QueryManager(HierarchyInterface *hierarchyInterface, int queryModes):
+/*QueryManager::QueryManager(HierarchyInterface *hierarchyInterface, int queryModes):
 mHierarchyInterface(hierarchyInterface),
 mQueryModes(queryModes)
@@ -15,4 +15,9 @@
     return false;
 }
-  
+*/
+QueryManager::QueryManager(int queryModes):
+mQueryModes(queryModes)
+{
+}
+
 } // namespace GtpVisibility
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/src/BatchedQueriesCullingManager.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/src/BatchedQueriesCullingManager.cpp	(revision 951)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/src/BatchedQueriesCullingManager.cpp	(revision 2280)
@@ -1,4 +1,4 @@
 #include "BatchedQueriesCullingManager.h"
-#include <OgreLogManager.h>
+
 
 namespace GtpVisibility {
@@ -21,6 +21,4 @@
 	QueryQueue queryQueue;
 	unsigned int visiblePixels = 0;
-
-	//Ogre::LogManager::getSingleton().logMessage("Batched Culling");
 
 	PendingQueue pendingQueue;
@@ -90,7 +88,4 @@
 					DecideVisible(node) && mHierarchyInterface->HasGeometry(node);
 
-				//if (mHierarchyInterface->LastVisited(node) >= mHierarchyInterface->GetFrameId())
-				//	Ogre::LogManager::getSingleton().logMessage("error");
-				
 				if (skipQuery)
 				{
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/src/StopAndWaitCullingManager.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/src/StopAndWaitCullingManager.cpp	(revision 2171)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/src/StopAndWaitCullingManager.cpp	(revision 2280)
@@ -1,4 +1,4 @@
 #include "StopAndWaitCullingManager.h"
-#include <OgreLogManager.h>
+
 
 namespace GtpVisibility {
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/src/VisibilityEnvironment.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/src/VisibilityEnvironment.cpp	(revision 2278)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/src/VisibilityEnvironment.cpp	(revision 2280)
@@ -15,5 +15,5 @@
 VisibilityEnvironment::~VisibilityEnvironment()
 {
-	//GtpVisibilityPreprocessor::Environment::DelSingleton();
+//	GtpVisibilityPreprocessor::Environment::DelSingleton();
 }
 //-----------------------------------------------------------------------
@@ -21,5 +21,6 @@
 {		
 	//-- parse environment
-	return false;//GtpVisibilityPreprocessor::Environment::GetSingleton()->ReadEnvFile(filename.c_str());
+	//return GtpVisibilityPreprocessor::Environment::GetSingleton()->ReadEnvFile(filename.c_str());
+	return false;
 }
 //-----------------------------------------------------------------------
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/src/FrustumCullingManager.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/src/FrustumCullingManager.cpp	(revision 925)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/src/FrustumCullingManager.cpp	(revision 2280)
@@ -1,4 +1,4 @@
 #include "FrustumCullingManager.h"
-#include <OgreLogManager.h>
+
 
 namespace GtpVisibility {
@@ -6,7 +6,7 @@
 //-----------------------------------------------------------------------
 void FrustumCullingManager::RenderScene()
-{
+{	
 	while (!mHierarchyInterface->GetQueue()->empty())
-	{
+	{;
 		HierarchyNode *node = mHierarchyInterface->GetQueue()->top();
 		mHierarchyInterface->GetQueue()->pop();
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/src/PreprocessingManager.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/src/PreprocessingManager.cpp	(revision 316)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/src/PreprocessingManager.cpp	(revision 2280)
@@ -11,5 +11,5 @@
 }
 
-bool PreprocessingManager::GetPVS(const Vector3 &center,
+/*bool PreprocessingManager::GetPVS(const Vector3 &center,
 								  const float radius,
 								  NodeInfoContainer *visibleNodes,
@@ -27,5 +27,5 @@
     }
     return false;
-  }
-  
+}
+  */
 };
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CoherentHierarchicalCullingManager.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CoherentHierarchicalCullingManager.cpp	(revision 2258)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CoherentHierarchicalCullingManager.cpp	(revision 2280)
@@ -1,4 +1,4 @@
 #include "CoherentHierarchicalCullingManager.h"
-#include <OgreLogManager.h>
+#include <time.h>
 
 namespace GtpVisibility {
@@ -143,12 +143,9 @@
 			mThreshold = RAND_MAX;
 	}
-	//std::stringstream d; d << "*** setting assumed vis: " << mAssumedVisibility; Ogre::LogManager::getSingleton().logMessage(d.str());
+	
 }
 //-----------------------------------------------------------------------
 inline bool CoherentHierarchicalCullingManager::DecideVisible(HierarchyNode *node) const
 {
-	//bool result = rand() < mThreshold; std::stringstream d; d << "Assumed vis: " << mAssumedVisibility << ", result: " << result;
-	//Ogre::LogManager::getSingleton().logMessage(d.str()); return result;
-	
 	return rand() < mThreshold;
 }
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/src/VisibilityManager.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/src/VisibilityManager.cpp	(revision 2278)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/src/VisibilityManager.cpp	(revision 2280)
@@ -4,6 +4,7 @@
 #include "FrustumCullingManager.h"
 #include "DummyPreprocessingManager.h"
-#include "DummyQueryManager.h"
 #include "RandomUpdateCullingManager.h"
+#include "CullingLogManager.h"
+
 
 namespace GtpVisibility {
@@ -33,4 +34,5 @@
 	delete mCullingManager;
 	delete mPreprocessingManager;
+	CullingLogManager::DelSingleton();
 }
 //-----------------------------------------------------------------------
@@ -65,11 +67,12 @@
 
 		default:
-			mCullingManager = new StopAndWaitCullingManager();
+			mCullingManager = new CoherentHierarchicalCullingManager(mAssumedVisibilityForChc);
 			break;
 
 		}
 
+		/////////
 		//-- set threshold
-		mCullingManager->SetVisibilityThreshold(mVisibilityThreshold);		
+		mCullingManager->SetVisibilityThreshold(mVisibilityThreshold);	
 	}
 }
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/src/GtpVisibility.vcproj
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/src/GtpVisibility.vcproj	(revision 2278)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/src/GtpVisibility.vcproj	(revision 2280)
@@ -189,6 +189,6 @@
 		<Configuration
 			Name="Release Internal|Win32"
-			OutputDirectory="$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
+			OutputDirectory="..\lib\Release"
+			IntermediateDirectory="..\obj\Release"
 			ConfigurationType="4"
 			CharacterSet="2">
@@ -204,6 +204,6 @@
 				OptimizeForProcessor="3"
 				OptimizeForWindowsApplication="TRUE"
-				AdditionalIncludeDirectories="..\include;&quot;$(OGRE_PATH)\OgreMain\include&quot;;..\..\Preprocessing\src"
-				PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
+				AdditionalIncludeDirectories="..\include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_VISIBILITY_MODIFIED_OGRE;GAMETOOLS_ILLUMINATION_MODULE"
 				RuntimeLibrary="2"
 				EnableEnhancedInstructionSet="2"
@@ -297,4 +297,7 @@
 			</File>
 			<File
+				RelativePath=".\CullingLogManager.cpp">
+			</File>
+			<File
 				RelativePath="..\src\CullingManager.cpp">
 			</File>
@@ -338,4 +341,7 @@
 			</File>
 			<File
+				RelativePath="..\include\CullingLogManager.h">
+			</File>
+			<File
 				RelativePath="..\include\CullingManager.h">
 			</File>
@@ -347,7 +353,4 @@
 			</File>
 			<File
-				RelativePath="..\include\DummyQueryManager.h">
-			</File>
-			<File
 				RelativePath="..\include\FrustumCullingManager.h">
 			</File>
@@ -378,7 +381,4 @@
 			<File
 				RelativePath="..\include\VisibilityManager.h">
-			</File>
-			<File
-				RelativePath="..\include\VisibilityMesh.h">
 			</File>
 		</Filter>
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CullingManager.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CullingManager.cpp	(revision 112)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CullingManager.cpp	(revision 2280)
@@ -1,13 +1,21 @@
 #include "CullingManager.h"
+
 
 namespace GtpVisibility {
 
+
+
 //-----------------------------------------------------------------------
 CullingManager::CullingManager():
-mHierarchyInterface(NULL), mVisibilityThreshold(0), mNumQueryCulledNodes(0), 
-mNumFrustumCulledNodes(0), mNumQueriesIssued(0),
+mHierarchyInterface(NULL), 
+mVisibilityThreshold(0), 
+mNumQueryCulledNodes(0), 
+mNumFrustumCulledNodes(0), 
+mNumQueriesIssued(0),
 mVisualizeCulledNodes(false)
 {
 }
+
+
 //-----------------------------------------------------------------------
 void CullingManager::SetHierarchyInterface(HierarchyInterface *hierarchyInterface)
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CullingLogManager.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CullingLogManager.cpp	(revision 2280)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/src/CullingLogManager.cpp	(revision 2280)
@@ -0,0 +1,44 @@
+#include "CullingLogManager.h"
+
+
+using namespace std;
+
+
+namespace GtpVisibility {
+
+CullingLogManager *CullingLogManager::sLogManager = NULL;
+
+
+CullingLogManager::CullingLogManager()
+{
+	mOutStream.open("culling.log");
+}
+
+
+CullingLogManager *CullingLogManager::GetSingleton()
+{
+	if (!sLogManager)
+	{
+		sLogManager = new CullingLogManager();
+	}
+
+	return sLogManager;
+}
+
+
+void CullingLogManager::DelSingleton()
+{
+	if (sLogManager)
+	{
+		delete sLogManager;
+		sLogManager = NULL;
+	}
+}
+
+
+void CullingLogManager::LogMessage(const string &str)
+{
+	mOutStream << str.c_str() << endl;
+}
+
+}
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/src/DummyPreprocessingManager.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/src/DummyPreprocessingManager.cpp	(revision 316)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/src/DummyPreprocessingManager.cpp	(revision 2280)
@@ -1,3 +1,5 @@
 #include "DummyPreprocessingManager.h"
+#include <iostream>
+#include <fstream>
 
 namespace GtpVisibility {
@@ -25,19 +27,13 @@
 
   
-  /** 
-      Find viewcells intersecting a spherical neighborhood of a point.
-      Returns false if no viewcell was found.
-    */
-bool DummyPreprocessingManager::LocateViewCellIds(const Vector3 &center,
+  
+/*bool DummyPreprocessingManager::LocateViewCellIds(const Vector3 &center,
 												  const float radius,
 												  vector<int> *viewCellIds)
 {
   return false;
-}
+}*/
   
-/** 
-    Uses the specified viewcell to find its PVS
-*/
-int DummyPreprocessingManager::AddViewCellPVS(const int cellID,
+/*int DummyPreprocessingManager::AddViewCellPVS(const int cellID,
 					  NodeInfoContainer *visibleNodes,
 					  MeshInfoContainer *visibleMeshes )
@@ -47,4 +43,4 @@
   return false;
 }
-
+*/
 }
Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/src/RandomUpdateCullingManager.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/src/RandomUpdateCullingManager.cpp	(revision 2278)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/src/RandomUpdateCullingManager.cpp	(revision 2280)
@@ -1,4 +1,6 @@
 #include "RandomUpdateCullingManager.h"
-#include <OgreLogManager.h>
+#include <time.h>
+#include "CullingLogManager.h"
+
 
 namespace GtpVisibility {
@@ -31,5 +33,5 @@
 	/////////////
 	//-- PART 1: process finished occlusion queries
-
+	CullingLogManager::GetSingleton()->LogMessage("here55");
 	while (!mHierarchyInterface->GetQueue()->empty() || !queryQueue.empty())
 	{
@@ -113,5 +115,5 @@
 						Ogre::LogManager::getSingleton().logMessage("g");
 				}
-
+				
 				if (mHierarchyInterface->IsNodeFullyVisible(node))
 				{Ogre::LogManager::getSingleton().logMessage("here8");
@@ -183,12 +185,9 @@
 			mThreshold = RAND_MAX;
 	}
-	//std::stringstream d; d << "*** setting assumed vis: " << mAssumedVisibility; Ogre::LogManager::getSingleton().logMessage(d.str());
+
 }
 //-----------------------------------------------------------------------
 inline bool RandomUpdateCullingManager::DecideVisible(HierarchyNode *node) const
 {
-	//bool result = rand() < mThreshold; std::stringstream d; d << "Assumed vis: " << mAssumedVisibility << ", result: " << result;
-	//Ogre::LogManager::getSingleton().logMessage(d.str()); return result;
-	
 	return rand() < mThreshold;
 }
