Index: GTP/trunk/Lib/Vis/Preprocessing/src/run_test2
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/run_test2	(revision 2622)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/run_test2	(revision 2627)
@@ -29,10 +29,10 @@
 
 SCENE=../data/Arena/arena-high-lods.obj
-VIEWCELLS=../data/Arena/viewcells-5000.xml.gz
+#VIEWCELLS=../data/Arena/viewcells-5000.xml.gz
+VIEWCELLS=../data/Arena/arena-high-lods-57000-viewcells.xml.gz
 
 
 #SCENE=../data/vienna/vienna_cropped.obj
 #VIEWCELLS=../data/vienna/vienna_cropped-gradient-viewcells.xml.gz
-
 
 #VIEWCELLS=../data/vienna/vienna-sequential-30000-single-viewcell.xml
@@ -49,6 +49,13 @@
 #-rss_distributions=direction+spatial+mutation \
 
+# $COMMAND -preprocessor=sampling -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \
+# -view_cells_use_kd_pvs+ -af_use_kd_pvs+ -view_cells_filter_width=1.0 \
+# -preprocessor_visibility_file=$PREFIX-reference.xml \
+# -view_cells_filter_max_size=1 -preprocessor_stats=$PREFIX-r-reference.log \
+# -preprocessor_histogram_file=$PREFIX-r-reference.hlog
+
+
 $COMMAND -preprocessor=combined -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \
--rss_distributions=direction+spatial+mutation \
+-rss_distributions=direction \
 -view_cells_use_kd_pvs+ -af_use_kd_pvs+ -view_cells_filter_width=1.0 \
 -preprocessor_visibility_file=$PREFIX-i-mixed-b1-n4a.xml \
@@ -56,3 +63,5 @@
 -preprocessor_histogram_file=$PREFIX-i-mixed-b1-n4a.hlog
 
+#+spatial+mutation
+
 #-rss_distributions=mutation+object_direction+spatial \
Index: GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp	(revision 2625)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/VspBspTree.cpp	(revision 2627)
@@ -3463,6 +3463,6 @@
 	float mint = 0.0f, maxt = 1.0f;
 
-	//ViewCell::NewMail();
-
+	//	ViewCell::NewMail();
+	
 	Vector3 entp = origin;
 	Vector3 extp = termination;
Index: GTP/trunk/Lib/Vis/Preprocessing/src/run_test_pixel
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/run_test_pixel	(revision 2059)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/run_test_pixel	(revision 2627)
@@ -48,8 +48,8 @@
 
 
-# $COMMAND -preprocessor=sampling -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \
-# -preprocessor_visibility_file=$PREFIX-r-reference.xml \
-# -view_cells_filter_max_size=1 -preprocessor_stats=$PREFIX-r-reference.log \
-# -preprocessor_histogram_file=$PREFIX-r-reference.hlog
+$COMMAND -preprocessor=sampling -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \
+-preprocessor_visibility_file=$PREFIX-r-reference.xml \
+-view_cells_filter_max_size=1 -preprocessor_stats=$PREFIX-r-reference.log \
+-preprocessor_histogram_file=$PREFIX-r-reference.hlog
 
 # $COMMAND -scene_filename=$SCENE -view_cells_filename=$VIEWCELLS \
Index: GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp	(revision 2625)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp	(revision 2627)
@@ -91,5 +91,5 @@
   GlRendererBuffer(sceneGraph, viewcells, tree)
 {
-  mUseVbos = false;
+  mUseVbos = true;
   MakeCurrent();
   InitGL();
@@ -145,9 +145,15 @@
 
 	ObjectPvs pvs;
-	
-	if (1) 
+
+	bool evaluateFilter;
+	Environment::GetSingleton()->GetBoolValue("Preprocessor.evaluateFilter", evaluateFilter);
+
+	if (!evaluateFilter) 
 		pvs = viewcell->GetPvs();
 	else 
-		mViewCellsManager->ApplyFilter2(viewcell, false, 1.0f, pvs);
+	  mViewCellsManager->ApplyFilter2(viewcell,
+									  false,
+									  mViewCellsManager->GetFilterWidth(),
+									  pvs);
 
 	mUseForcedColors = true;
Index: GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp	(revision 2625)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsManager.cpp	(revision 2627)
@@ -2614,5 +2614,4 @@
 #endif
 	  }
-	
 	mSamplesStat.mViewCells += (int)viewCells.size();
 
@@ -4664,5 +4663,5 @@
 										ViewCellContainer &viewcells)
 {
-	return mKdTree->CastLineSegment(origin, termination, viewcells);
+  return mKdTree->CastLineSegment(origin, termination, viewcells);
 }
 
@@ -6415,5 +6414,6 @@
 											ViewCellContainer &viewcells)
 {
-	return mHierarchyManager->CastLineSegment(origin, termination, viewcells);
+
+  return mHierarchyManager->CastLineSegment(origin, termination, viewcells);
 }
 
Index: GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsParserXerces.h
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsParserXerces.h	(revision 2588)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/ViewCellsParserXerces.h	(revision 2627)
@@ -9,5 +9,5 @@
 #include "BoundingBoxConverter.h"
 
-#ifdef __WINDOWS__
+#ifdef _WIN32
 #include <hash_map>
 #else
@@ -61,5 +61,5 @@
 
 
-#ifdef __WINDOWS__
+#ifdef _WIN32
 typedef stdext::hash_map<int, Intersectable *> pvs_hash;
 #else
Index: GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro	(revision 2612)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/preprocessor.pro	(revision 2627)
@@ -31,5 +31,6 @@
 #XERCES = $$NONGTP/Xerces/xerces-c_2_8_0
   
-INCLUDEPATH += ../src ../src/Timer ../src/QtInterface $$XERCES/include  $$NONGTP/Zlib/include $$NONGTP/Boost $$NONGTP/Devil/include
+INCLUDEPATH += ../src ../src/Timer ../src/QtInterface $$XERCES/include \
+  $$NONGTP/Zlib/include $$NONGTP/Boost $$NONGTP/Devil/include sparsehash/src
 
 win32:LIBPATH += GL $$XERCES/lib $$NONGTP/Devil/lib \
Index: GTP/trunk/Lib/Vis/Preprocessing/src/PvsDefinitions.h
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/PvsDefinitions.h	(revision 2625)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/PvsDefinitions.h	(revision 2627)
@@ -9,4 +9,5 @@
 //$$ 19.1. 2008 test for speed
 //#define USE_BIT_PVS
+//#define USE_HASH_PVS
 
 
