Index: /GTP/trunk/App/Demos/Illum/Ogre/src/GameToolsRaytraceDemo/scripts/GameToolsRaytraceDemo.7.10.vcproj
===================================================================
--- /GTP/trunk/App/Demos/Illum/Ogre/src/GameToolsRaytraceDemo/scripts/GameToolsRaytraceDemo.7.10.vcproj	(revision 2141)
+++ /GTP/trunk/App/Demos/Illum/Ogre/src/GameToolsRaytraceDemo/scripts/GameToolsRaytraceDemo.7.10.vcproj	(revision 2164)
@@ -164,4 +164,7 @@
 			</File>
 		</Filter>
+		<File
+			RelativePath="..\..\..\..\..\..\..\..\..\Ogre\trunk\ogrenew\Samples\Common\bin\Release\resources.cfg">
+		</File>
 	</Files>
 	<Globals>
Index: /GTP/trunk/App/Demos/Illum/Ogre/bin/Release/resources.cfg
===================================================================
--- /GTP/trunk/App/Demos/Illum/Ogre/bin/Release/resources.cfg	(revision 2156)
+++ /GTP/trunk/App/Demos/Illum/Ogre/bin/Release/resources.cfg	(revision 2164)
@@ -48,6 +48,6 @@
 FileSystem=../../Media/materials/GTPAdvancedEnvMap/multibounce/multipleRefraction
 
-[GTP_MultipleCausticRefraction]
-FileSystem=../../Media/materials/GTPAdvancedEnvMap/multibounce/multipleCausticRefraction
+#[GTP_MultipleCausticRefraction]
+#FileSystem=../../Media/materials/GTPAdvancedEnvMap/multibounce/multipleCausticRefraction
 
 [GTP_MultipleReflection_MinMax]
@@ -57,4 +57,4 @@
 FileSystem=../../Media/materials/GTPAdvancedEnvMap/multibounce/multipleRefractionMinMax
 
-[GTP_MultipleCausticRefraction_MinMax]
-FileSystem=../../Media/materials/GTPAdvancedEnvMap/multibounce/multipleCausticRefractionMinMax
+#[GTP_MultipleCausticRefraction_MinMax]
+#FileSystem=../../Media/materials/GTPAdvancedEnvMap/multibounce/multipleCausticRefractionMinMax
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOcclusionCullingSceneManager.h
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOcclusionCullingSceneManager.h	(revision 2160)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/include/OgreOcclusionCullingSceneManager.h	(revision 2164)
@@ -36,5 +36,5 @@
 
 	void _renderVisibleObjects();
-	void _findVisibleObjects(Camera* cam, bool onlyShadowCasters);
+	void myFindVisibleObjects(Camera* cam, bool onlyShadowCasters);
 	void _updateSceneGraph(Camera* cam);
 
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp	(revision 2161)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp	(revision 2164)
@@ -678,5 +678,5 @@
 }
 //-----------------------------------------------------------------------
-void OcclusionCullingSceneManager::_findVisibleObjects(Camera* cam,
+void OcclusionCullingSceneManager::myFindVisibleObjects(Camera* cam,
 														bool onlyShadowCasters)
 {
@@ -2033,5 +2033,5 @@
     {
         // Parse the scene and tag visibles
-        _findVisibleObjects(camera, 
+        myFindVisibleObjects(camera, 
             mIlluminationStage == IRS_RENDER_TO_TEXTURE? true : false);
     }
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/RayCaster.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/RayCaster.h	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/RayCaster.h	(revision 2164)
@@ -88,9 +88,7 @@
 	
 	void Reserve(const int number) {
-		cout<<"here3"<<endl;
-	DEL_PTR(mRays);
-	cout<<"here44"<<endl;
-	  mRays = new VssRay[number];
-	  mNumber = number;
+		DEL_PTR(mRays);
+		mRays = new VssRay[number];
+		mNumber = number;
 	}
 	
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/HashPvs.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/HashPvs.h	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/HashPvs.h	(revision 2164)
@@ -25,11 +25,4 @@
    };
 
-   /*int operator()(T a) const
-   {
-	   if (!a)
-		   return -2;
-	   return (size_t)(a->GetId());
-   }*/
-
    int operator()(int a) const
    {
@@ -103,10 +96,8 @@
 public:
 
-	//HashPvs(): mEntries((Intersectable *)100) {};
-	HashPvs() 
+	HashPvs()//: mEntries(1009)
 	{
 		 mEntries.set_deleted_key(-1);
 		 mEntries.set_empty_key(-2);
-		 //mEntries.Reset();
 	};
 	//virtual ~HashPvs() {};
@@ -141,5 +132,5 @@
 	bool IsDirty() const;
 
-	bool RequiresResort() const;
+	inline bool RequiresResort() const;
 
 	/** Finds sample in PVS.
@@ -273,4 +264,9 @@
 										const float pdf)
 {
+	static pair<HASH_ITERATOR, bool> result;
+	result = mEntries.insert(pair<int, T>(sample->GetId(), sample));
+	return result.second;
+
+	/*
 	static CONST_HASH_ITERATOR it;
 
@@ -280,4 +276,5 @@
 	const bool found = (it != mEntries.end());
 
+	//return false;
 	// already in map
 	if (found)
@@ -287,5 +284,5 @@
 	mEntries.insert(pair<int, T>(sample->GetId(), sample));
 	
-	return true;
+	return true;*/
 }
 
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp	(revision 2124)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp	(revision 2164)
@@ -1660,5 +1660,5 @@
 	if (pvsObjects.empty())
 	{
-		Debug << "here81 no objects" << endl;
+		Debug << "no objects" << endl;
 		pvsObjects = preprocessorObjects;
 	}
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.vcproj
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.vcproj	(revision 2162)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.vcproj	(revision 2164)
@@ -221,5 +221,5 @@
 				OptimizeForProcessor="3"
 				OptimizeForWindowsApplication="TRUE"
-				AdditionalIncludeDirectories="..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;..\..\..\..\..\..\NonGTP\Boost;..\MultiLevelRayTracing;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(QTDIR)\include\QtOpenGl&quot;;&quot;$(CG_INC_PATH)&quot;;Timer;..\src\ootl\src\;..\src\ootl\src\cpp;..\src\ootl\src\include\ootl\sandbox;..\src\ootl\;..\src\ootl\src\include\ootl;..\src\sparsehash\src\google\sparsehash;..\src\sparsehash\src\windows;..\src\sparsehash\src\google;..\src\sparsehash\src"
+				AdditionalIncludeDirectories="..\src;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;..\..\..\..\..\..\NonGTP\Boost;..\MultiLevelRayTracing;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(QTDIR)\include\QtOpenGl&quot;;&quot;$(CG_INC_PATH)&quot;;Timer;..\src\ootl\src\;..\src\ootl\src\cpp;..\src\ootl\src\include\ootl\sandbox;..\src\ootl\src;..\src\ootl\src\include\ootl;..\src\sparsehash\src\google\sparsehash;..\src\sparsehash\src\windows;..\src\sparsehash\src\google;..\src\sparsehash\src;..\src\ootl\"
 				PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_INTERNAL;USE_QT;USE_HASH_PVS"
 				ExceptionHandling="TRUE"
@@ -1160,8 +1160,8 @@
 			</File>
 			<File
+				RelativePath=".\sparsehash\src\windows\hash_fun.h">
+			</File>
+			<File
 				RelativePath=".\sparsehash\src\google\sparsehash\hash_fun.h">
-			</File>
-			<File
-				RelativePath=".\sparsehash\src\windows\hash_fun.h">
 			</File>
 			<File
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp	(revision 2161)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp	(revision 2164)
@@ -2657,6 +2657,5 @@
 	if (addSamplesToPvs) 
 	{
-		hasAbsContribution = viewCell->GetPvs().
-			AddSampleDirtyCheck(obj, ray.mPdf);
+		hasAbsContribution = viewCell->GetPvs().AddSampleDirtyCheck(obj, ray.mPdf);
 		//hasAbsContribution = viewCell->GetPvs().AddSample(obj,ray.mPdf);
 	}
@@ -2664,7 +2663,5 @@
 	{
 		hasAbsContribution = 
-			viewCell->GetPvs().GetSampleContribution(obj,
-			ray.mPdf,
-			relContribution);
+			viewCell->GetPvs().GetSampleContribution(obj, ray.mPdf, relContribution);
 	}
 
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.cpp	(revision 2124)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/ViewCell.cpp	(revision 2164)
@@ -1996,5 +1996,5 @@
 	default:
 		// pvs is stored consistently in the tree up
-		//to the root just return pvs size 
+		// to the root just return pvs size 
 		pvsCost = vc->GetPvs().EvalPvsCost();	
 		break;
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/Intersectable.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/Intersectable.h	(revision 2116)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/Intersectable.h	(revision 2164)
@@ -63,6 +63,6 @@
   virtual ~Intersectable();
 
-  void SetId(const int id) { mId = id; }
-  int GetId() { return mId; }
+  inline void SetId(const int id) { mId = id; }
+  inline int GetId() { return mId; }
   
   /////////////
