Index: GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreVisibilitySceneManagerDll.cpp
===================================================================
--- GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreVisibilitySceneManagerDll.cpp	(revision 1151)
+++ GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreVisibilitySceneManagerDll.cpp	(revision 1153)
@@ -71,8 +71,7 @@
 {
 	//delete heightmapTerrainPageSource;
-
 	// BUG: crashes on delete!!!! FIX this 
 
-	 //delete visibilityTerrainPlugin;
+	//delete visibilityTerrainPlugin;
 	delete occlusionCullingPlugin;
 
Index: GTP/trunk/Lib/Vis/Preprocessing/src/BoostPreprocessorThread.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/BoostPreprocessorThread.cpp	(revision 1146)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/BoostPreprocessorThread.cpp	(revision 1153)
@@ -25,5 +25,6 @@
 	Camera camera;
 
-	if (0) 
+	cout << "here79\n"; 
+	if (0)
 	{
 		// camera.LookAtBox(mPreprocessor->mKdTree->GetBox());
@@ -62,5 +63,5 @@
 BoostPreprocessorThread::~BoostPreprocessorThread()
 {
-	cerr<<"Boost Preprocessor thread destructor...\n";
+	cerr << "Boost Preprocessor thread destructor ... \n";
 	DEL_PTR(mThread);
 }
Index: GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp	(revision 1152)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp	(revision 1153)
@@ -30,5 +30,5 @@
 
 // DLL function signature
-typedef GlRendererWidget *(*importFunction)();
+typedef GlRendererWidget *(*importFunction)(Preprocessor *);
 
 int LoadMyDll()
@@ -37,5 +37,5 @@
 	
     // Load DLL file
-	HINSTANCE hinstLib = LoadLibrary("QtRenderer.dll");
+	HINSTANCE hinstLib = LoadLibrary("QtGlRenderer.dll");
 	
 	if (hinstLib == NULL) 
@@ -46,5 +46,5 @@
 
 	// Get function pointer
-    LoadRenderWidget = (importFunction)GetProcAddress(hinstLib, "LoadRenderWidget");
+	LoadRenderWidget = (importFunction)GetProcAddress(hinstLib, "LoadRenderWidget");
 	
 	if (LoadRenderWidget == NULL) 
@@ -55,5 +55,5 @@
 
 	// load the render window
-    rendererWidget = LoadRenderWidget();
+    rendererWidget = LoadRenderWidget(preprocessor);
 
 	// Unload DLL file
@@ -81,42 +81,5 @@
 		LoadMyDll();
 
-	// note matt: capsulate qt dependent code as good as possible
-	/*new GlRendererWidget(preprocessor->mSceneGraph, 
-						   preprocessor->mViewCellsManager, 
-						   preprocessor->mKdTree);
-*/
-	rendererWidget->Show();
-
-#if QT_ENABLED
-
-	// create a qt application first (must be created before any opengl widget ...)
-	app = new QApplication(argc, argv);
-
-	if (!QGLFormat::hasOpenGL() || !QGLPixelBuffer::hasOpenGLPbuffers()) {
-		QMessageBox::information(0, "OpenGL pbuffers", 
-			"This system does not support OpenGL/pbuffers.",
-			QMessageBox::Ok);
-		return -1;
-	}
-	
-	// note matt: capsulate qt dependent code as good as possible
-	rendererWidget = 
-		new GlRendererWidget(p->mSceneGraph, p->mViewCellsManager, p->mKdTree);
-
-	rendererWidget->resize(640, 480);
-	rendererWidget->show();
-
-	if (0 && p->GetRenderer()) 
-	{
-		cout<<"CONNECTING"<<endl;
-		QObject::connect(p->GetRenderer(),
-		SIGNAL(UpdatePvsErrorItem(int i, GlRendererBuffer::PvsErrorEntry &)),
-				rendererWidget->mControlWidget, 
-				SLOT(UpdatePvsErrorItem(int i,
-				GlRendererBuffer::PvsErrorEntry &)));
-
-		cout<<"CONNECTED"<<endl;
-	}
-#endif
+	//rendererWidget->Show();
 }
 
@@ -136,5 +99,5 @@
 
 	int returnCode = 0;
-
+	
 	InitTiming();
 
@@ -215,10 +178,12 @@
 	if (preprocessor->mUseGlRenderer || preprocessor->mUseGlDebugger)
 	{
+		cout << "here99" << endl; 
+		// create and run the preprocessor application in a parallel thread
+		pt.InitThread();	cout << "here77" << endl; 
+		//pt.RunThread();
+
+		cout << "here51" << endl; 
 		// display the render widget
 		DisplayWidget();
-
-		// create and run the preprocessor application in a parallel thread
-		pt.InitThread();
-		pt.RunThread();
 	} 
 	else
@@ -227,6 +192,5 @@
 		pt.Main();
 	}
-
-
+	cout << "here39" << endl; 
 	Cleanup();
 
Index: GTP/trunk/Lib/Vis/QtRenderer/QtRenderer.vcproj
===================================================================
--- GTP/trunk/Lib/Vis/QtRenderer/QtRenderer.vcproj	(revision 1151)
+++ GTP/trunk/Lib/Vis/QtRenderer/QtRenderer.vcproj	(revision 1153)
@@ -3,5 +3,5 @@
 	ProjectType="Visual C++"
 	Version="7.10"
-	Name="QtRenderer"
+	Name="QtGlRenderer"
 	ProjectGUID="{B85DC7B1-58B6-4912-BD64-8B452630A368}"
 	Keyword="Win32Proj">
@@ -82,5 +82,5 @@
 				Name="VCLinkerTool"
 				AdditionalDependencies="Preprocessor.lib qtmain.lib QtGui4.lib Qt3Support4.lib QAxContainer.lib QtCore4.lib QtOpenGL4.lib xerces-c_2.lib glew32.lib OpenGL32.Lib glu32.lib cg.lib cgGL.lib"
-				OutputFile="$(OutDir)/QtRenderer.dll"
+				OutputFile="$(OutDir)/QtGlRenderer.dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="&quot;$(QTDIR)\lib&quot;;..\..\..\..\..\NonGTP\Zlib\lib;&quot;$(CG_LIB_PATH)&quot;;&quot;..\Preprocessing\lib\$(ConfigurationName)&quot;;..\Preprocessing\src\GL;..\..\..\..\..\NonGTP\Xerces\xercesc\lib"
@@ -94,5 +94,6 @@
 				Name="VCMIDLTool"/>
 			<Tool
-				Name="VCPostBuildEventTool"/>
+				Name="VCPostBuildEventTool"
+				CommandLine="copy $(OutDir)\$(TargetFileName) $(OutDir)\..\..\Preprocessing\scripts"/>
 			<Tool
 				Name="VCPreBuildEventTool"/>
@@ -127,5 +128,5 @@
 			</File>
 			<File
-				RelativePath=".\QtRendererDll.cpp">
+				RelativePath=".\QtGlRendererDll.cpp">
 			</File>
 		</Filter>
@@ -141,5 +142,6 @@
 						Name="VCCustomBuildTool"
 						Description="Performing moc on $(InputName).h"
-						CommandLine="%qtdir%\bin\moc.exe $(InputDir)$(InputName).h -o $(InputDir)moc_$(InputName).cpp"
+						CommandLine="%qtdir%\bin\moc.exe $(InputDir)$(InputName).h -o $(InputDir)moc_$(InputName).cpp
+"
 						Outputs="$(InputDir) moc_$(InputName).cpp"/>
 				</FileConfiguration>
