Index: GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp	(revision 2671)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp	(revision 2676)
@@ -69,14 +69,16 @@
 #endif
 
-void
-QtGlRendererBuffer::MakeCurrent()
-{
-	makeCurrent();
-}
-
-void
-QtGlRendererBuffer::DoneCurrent()
-{
-	doneCurrent();
+
+void QtGlRendererBuffer::MakeCurrent()
+{
+	QGLPixelBuffer::makeCurrent();
+	//makeCurrent();
+}
+
+
+void QtGlRendererBuffer::DoneCurrent()
+{
+	QGLPixelBuffer::doneCurrent();
+	//doneCurrent();
 }
   
Index: GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtInterface05.vcproj
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtInterface05.vcproj	(revision 2660)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtInterface05.vcproj	(revision 2676)
@@ -104,5 +104,5 @@
 				Name="VCCLCompilerTool"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="..\src;..\..\src\;..\..\..\..\..\..\..\NonGTP\Zlib\include;&quot;$(QTDIR)\include\QtOpenGL&quot;;&quot;$(QTDIR)\include\Qt&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(CG_INC_PATH)&quot;;&quot;..\..\..\..\..\..\NonGTP\Xerces\xerces-c_2_8_0-x86-windows-vc_8_0\include&quot;"
+				AdditionalIncludeDirectories="..\src;..\..\src\;..\..\..\..\..\..\..\NonGTP\Zlib\include;&quot;$(QTDIR)\include\QtOpenGL&quot;;&quot;$(QTDIR)\include\Qt&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(CG_INC_PATH)&quot;;&quot;..\..\..\..\..\..\NonGTP\Xerces\xerces-c_2_8_0\include&quot;"
 				PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GTP_INTERNAL;USE_QT;USE_VERBOSE_PVS;USE_CG"
 				RuntimeLibrary="2"
Index: GTP/trunk/Lib/Vis/Preprocessing/src/GtpVisibility05.vcproj
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/GtpVisibility05.vcproj	(revision 2660)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/GtpVisibility05.vcproj	(revision 2676)
@@ -115,5 +115,5 @@
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="..\src;Timer;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;&quot;..\..\..\..\..\..\NonGTP\Xerces\xerces-c_2_8_0-x86-windows-vc_8_0\include&quot;;..\..\..\..\..\..\NonGTP\Boost;..\src\havran;..\MultiLevelRayTracing;&quot;$(CG_INC_PATH)&quot;"
+				AdditionalIncludeDirectories="..\src;Timer;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;&quot;..\..\..\..\..\..\NonGTP\Xerces\xerces-c_2_8_0\include&quot;;..\..\..\..\..\..\NonGTP\Boost;..\src\havran;..\MultiLevelRayTracing;&quot;$(CG_INC_PATH)&quot;"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;USE_VERBOSE_PVS;USE_QT;GTP_INTERNAL;USE_CG"
 				RuntimeLibrary="2"
Index: GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor05.vcproj
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor05.vcproj	(revision 2662)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/TestPreprocessor05.vcproj	(revision 2676)
@@ -129,5 +129,5 @@
 				EnableFiberSafeOptimizations="false"
 				WholeProgramOptimization="true"
-				AdditionalIncludeDirectories="..\src;..\include;..\..\..\..\..\..\NonGTP\Boost;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;&quot;$(QTDIR)\include\QtOpenGl&quot;;&quot;$(QTDIR)\include\Qt&quot;;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include&quot;;QtInterface;..\src\sparsehash\src\;..\src\ootl\src\include\ootl;..\src\ootl\src\include\ootl\sandbox;&quot;..\..\..\..\..\..\NonGTP\Xerces\xerces-c_2_8_0-x86-windows-vc_8_0\include&quot;;$(NOINHERIT)"
+				AdditionalIncludeDirectories="..\src;..\include;..\..\..\..\..\..\NonGTP\Boost;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;&quot;$(QTDIR)\include\QtOpenGl&quot;;&quot;$(QTDIR)\include\Qt&quot;;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include&quot;;QtInterface;..\src\sparsehash\src\;..\src\ootl\src\include\ootl;..\src\ootl\src\include\ootl\sandbox;$(NOINHERIT)"
 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;GTP_INTERNAL;USE_QT;USE_CG;USE_VERBOSE_PVS"
 				StringPooling="true"
@@ -156,5 +156,5 @@
 				OutputFile="../bin/$(ConfigurationName)/Preprocessor.exe"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="&quot;$(QTDIR)\lib&quot;;..\src\GL;&quot;..\lib05\$(ConfigurationName)&quot;;..\..\..\..\..\..\NonGTP\Boost\lib;..\..\..\..\..\..\NonGTP\Zlib\lib;..\..\..\..\..\..\NonGTP\Devil\lib;&quot;..\MultiLevelRayTracing\RTScene\$(ConfigurationName)&quot;;&quot;..\MultiLevelRayTracing\RTWorld\$(ConfigurationName)&quot;;&quot;QtInterface\$(ConfigurationName)&quot;;&quot;..\..\..\..\..\..\NonGTP\Xerces\xerces-c_2_8_0-x86-windows-vc_8_0\lib&quot;;&quot;$(CG_LIB_PATH)&quot;"
+				AdditionalLibraryDirectories="&quot;$(QTDIR)\lib&quot;;..\src\GL;&quot;..\lib05\$(ConfigurationName)&quot;;..\..\..\..\..\..\NonGTP\Boost\lib;..\..\..\..\..\..\NonGTP\Zlib\lib;..\..\..\..\..\..\NonGTP\Devil\lib;&quot;..\MultiLevelRayTracing\RTScene\$(ConfigurationName)&quot;;&quot;..\MultiLevelRayTracing\RTWorld\$(ConfigurationName)&quot;;&quot;QtInterface\$(ConfigurationName)&quot;;&quot;..\..\..\..\..\..\NonGTP\Xerces\xerces-c_2_8_0\lib&quot;;&quot;$(CG_LIB_PATH)&quot;"
 				GenerateDebugInformation="true"
 				SubSystem="1"
Index: GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp	(revision 2667)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp	(revision 2676)
@@ -131,41 +131,30 @@
 main(int argc, char **argv)
 {
-#if 0
-  // Test code by VH
-  TestRTcamera(argc, argv);
-  //TestRTfromFile(argc, argv);
-  //TestRTfromFilePackets(argc, argv);
-  //TestRT_4_fromFile(argc, argv);
-  return 0;
+	int returnCode = 0;
+
+#ifdef _CRT_SET
+
+	//Now just call this function at the start of your program and if you're
+	//compiling in debug mode (F5), any leaks will be displayed in the Output
+	//window when the program shuts down. If you're not in debug mode this will
+	//be ignored. Use it as you will!
+	//note: from GDNet Direct [3.8.04 - 3.14.04] void detectMemoryLeaks() {
+
+	_CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF|_CRTDBG_ALLOC_MEM_DF);
+	_CrtSetReportMode(_CRT_ASSERT,_CRTDBG_MODE_FILE);
+	_CrtSetReportFile(_CRT_ASSERT,_CRTDBG_FILE_STDERR); 
 #endif
-cout<<"hello world"<<endl;
-
-  int returnCode = 0;
-
-  //Now just call this function at the start of your program and if you're
-  //compiling in debug mode (F5), any leaks will be displayed in the Output
-  //window when the program shuts down. If you're not in debug mode this will
-  //be ignored. Use it as you will!
-  //note: from GDNet Direct [3.8.04 - 3.14.04] void detectMemoryLeaks() {
-
-//#define _CRT_SET
-
-#ifdef _CRT_SET
-  _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF|_CRTDBG_ALLOC_MEM_DF);
-  _CrtSetReportMode(_CRT_ASSERT,_CRTDBG_MODE_FILE);
-  _CrtSetReportFile(_CRT_ASSERT,_CRTDBG_FILE_STDERR); 
-#endif
-
-  InitTiming();
-  Debug.open("debug.log");
-
-  Environment::GetSingleton()->Parse(argc, argv, USE_EXE_PATH);
-  MeshKdTree::ParseEnvironment();
-  
-  char buff[128];
-  Environment::GetSingleton()->GetStringValue("Preprocessor.type", buff);
-  string preprocessorType(buff);
-  
-  if (!(preprocessor = PreprocessorFactory::CreatePreprocessor(preprocessorType)))
+
+	InitTiming();
+	Debug.open("debug.log");
+
+	Environment::GetSingleton()->Parse(argc, argv, USE_EXE_PATH);
+	MeshKdTree::ParseEnvironment();
+
+	char buff[128];
+	Environment::GetSingleton()->GetStringValue("Preprocessor.type", buff);
+	string preprocessorType(buff);
+
+	if (!(preprocessor = PreprocessorFactory::CreatePreprocessor(preprocessorType)))
 	{
 		Environment::DelSingleton();
@@ -174,11 +163,11 @@
 	}
 
-	
+
 	Environment::GetSingleton()->GetStringValue("Scene.filename", buff);
 	string filename(buff);
-	
+
 	const string externKdTree = ReplaceSuffix(filename, ".obj", ".kdf");
 	const string internKdTree = GetInternFilename(filename, preprocessor->mLoadMeshes ?
-												  ".kdm" : ".kdt");
+		".kdm" : ".kdt");
 
 	if (preprocessor->InitRayCast(externKdTree, internKdTree))
@@ -193,7 +182,4 @@
 	}
 
-	
-	//Debug << "using pvs type " << PVS_TYPE << endl;
-
 	/////////////
 	//-- load scene 
@@ -205,5 +191,5 @@
 		exit(1);
 	}
-	
+
 
 	////////////
@@ -220,5 +206,5 @@
 		exit(1);
 	}
-	
+
 	// export objects as obj
 	if (preprocessor->mExportObj)
@@ -231,5 +217,5 @@
 		else
 		{
-		  
+
 			const string objname = GetInternFilename(filename, ".obj");
 
@@ -237,5 +223,4 @@
 			bool success = preprocessor->ExportObj(objname, preprocessor->mObjects);
 
-			
 			if (success)
 				cout << "finished exporting obj" << endl;
@@ -267,5 +252,5 @@
 	bool importRandomViewCells;
 	Environment::GetSingleton()->GetBoolValue("ViewCells.importRandomViewCells",
-											   importRandomViewCells);
+		importRandomViewCells);
 
 	if (importRandomViewCells)
@@ -279,5 +264,5 @@
 	bool useHwGlobalLines;
 	Environment::GetSingleton()->GetBoolValue("Preprocessor.useHwGlobalLines",
-											   useHwGlobalLines);
+		useHwGlobalLines);
 
 	if (useHwGlobalLines)
@@ -286,5 +271,5 @@
 	// create a preprocessor thread (note: capsulates calls to boost fuctions!)
 	PreprocessorThread *pt = NULL;
-	
+
 	//preprocessor->PrepareHwGlobalLines();
 	//globalLinesRenderer->Run();
@@ -306,5 +291,5 @@
 	QApplication *app = new QApplication(argc, NULL);
 	pt = new QtPreprocessorThread(preprocessor);	
-	
+
 	if (evalPixelError && (importRandomViewCells || frames))
 	{
@@ -328,15 +313,15 @@
 		// $$matt
 		preprocessor->renderer = 
-		  new QtGlRendererBuffer(1024, 1024,
-								 preprocessor->mSceneGraph,
-								 preprocessor->mViewCellsManager,
-								 preprocessor->mKdTree);
-		
+			new QtGlRendererBuffer(1024, 1024,
+			preprocessor->mSceneGraph,
+			preprocessor->mViewCellsManager,
+			preprocessor->mKdTree);
+
 	}
 
 	bool exportRandomViewCells;
 	Environment::GetSingleton()->GetBoolValue("ViewCells.exportRandomViewCells",
-											  exportRandomViewCells);
-	
+		exportRandomViewCells);
+
 	if (exportRandomViewCells)
 	{
@@ -372,6 +357,6 @@
 			rendererWidget = 
 				new QtGlRendererWidget(preprocessor->mSceneGraph,
-									   preprocessor->mViewCellsManager,
-									   preprocessor->mKdTree);
+				preprocessor->mViewCellsManager,
+				preprocessor->mKdTree);
 
 			rendererWidget->Show();
@@ -397,8 +382,8 @@
 
 	/*#if USE_THREADS
-		pt = new BoostPreprocessorThread(preprocessor);
+	pt = new BoostPreprocessorThread(preprocessor);
 	#else
-		// use a dummy thread
-		pt = new DummyPreprocessorThread(preprocessor);
+	// use a dummy thread
+	pt = new DummyPreprocessorThread(preprocessor);
 	#endif
 	*/
