Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp	(revision 1004)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreOcclusionCullingSceneManager.cpp	(revision 1146)
@@ -1055,5 +1055,5 @@
 		if (!(*oit).first) continue;
 
-		OgreMeshInstance *omi = dynamic_cast<OgreMeshInstance*>((*oit).first);
+		OgreMeshInstance *omi = dynamic_cast<OgreMeshInstance *>((*oit).first);
 		omi->GetMesh()->setVisible(load);
 		//GtpVisibilityPreprocessor::Debug << "assigned id " << omi->GetId() << endl;
Index: /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreSolidHalfBoundingBox.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreSolidHalfBoundingBox.cpp	(revision 117)
+++ /GTP/trunk/Lib/Vis/OnlineCullingCHC/OGRE/src/OgreSolidHalfBoundingBox.cpp	(revision 1146)
@@ -41,6 +41,6 @@
 	// 0+------+4      *---x
 
-	// fan 1
-	if (isFirstHalf)
+	
+	if (isFirstHalf) // fan 1
 	{
 		*pPos++ = min.x; *pPos++ = max.y; *pPos++ = max.z; //011
@@ -54,6 +54,5 @@
 		*pPos++ = min.x; *pPos++ = min.y; *pPos++ = max.z; //001
 	}
-	else
-	// fan 2
+	else // fan 2
 	{
 		*pPos++ = max.x; *pPos++ = min.y; *pPos++ = min.z; //100
Index: /GTP/trunk/Lib/Vis/Preprocessing/scripts/Preprocessor.vcproj
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/scripts/Preprocessor.vcproj	(revision 1145)
+++ /GTP/trunk/Lib/Vis/Preprocessing/scripts/Preprocessor.vcproj	(revision 1146)
@@ -64,5 +64,5 @@
 				FavorSizeOrSpeed="0"
 				OptimizeForWindowsApplication="TRUE"
-				AdditionalIncludeDirectories="..\include;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(QTDIR)\include\QtOpenGl&quot;;..\src;&quot;$(CG_INC_PATH)&quot;;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces"
+				AdditionalIncludeDirectories="..\include;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtGui&quot;;&quot;$(QTDIR)\include&quot;;&quot;$(QTDIR)\include\QtOpenGl&quot;;..\src;&quot;$(CG_INC_PATH)&quot;;..\..\..\..\..\..\NonGTP\Devil\include;..\..\..\..\..\..\NonGTP\Zlib\include;..\..\..\..\..\..\NonGTP\Xerces;&quot;$(BOOST_INCLUDE)&quot;"
 				PreprocessorDefinitions="WIN32;NDEBUG;_LIB;"
 				ExceptionHandling="TRUE"
@@ -119,4 +119,10 @@
 			</File>
 			<File
+				RelativePath="..\src\BoostPreprocessorThread.cpp">
+			</File>
+			<File
+				RelativePath="..\src\BoostPreprocessorThread.h">
+			</File>
+			<File
 				RelativePath="..\src\BoundingBoxConverter.h">
 			</File>
@@ -338,10 +344,4 @@
 			</File>
 			<File
-				RelativePath="..\src\RenderSimulator.cpp">
-			</File>
-			<File
-				RelativePath="..\src\RenderSimulator.h">
-			</File>
-			<File
 				RelativePath="..\src\ResourceManager.h">
 			</File>
@@ -530,14 +530,14 @@
 			</File>
 			<File
-				RelativePath="..\src\QtGlRenderer.cpp">
-			</File>
-			<File
-				RelativePath="..\src\QtGlRenderer.h">
-			</File>
-			<File
 				RelativePath="..\src\Renderer.cpp">
 			</File>
 			<File
 				RelativePath="..\src\Renderer.h">
+			</File>
+			<File
+				RelativePath="..\src\RenderSimulator.cpp">
+			</File>
+			<File
+				RelativePath="..\src\RenderSimulator.h">
 			</File>
 		</Filter>
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/RssPreprocessor.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/RssPreprocessor.cpp	(revision 1145)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/RssPreprocessor.cpp	(revision 1146)
@@ -707,5 +707,5 @@
 	  GenerateRays(mRssSamplesPerPass*ratios[0], RSS_BASED_DISTRIBUTION, rays);
 
-	  rays.NormalizePdf(rays.size());
+	  rays.NormalizePdf((int)rays.size());
 	  
 	  CastRays(rays, tmpVssRays);
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/VspOspTree.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/VspOspTree.cpp	(revision 1145)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/VspOspTree.cpp	(revision 1146)
@@ -1444,7 +1444,15 @@
 		if (((*ci).value >= minBand) && ((*ci).value <= maxBand))
 		{
+
+			float currentPos;
+			
+			// HACK: current positition is BETWEEN visibility events
+			if (ci != ci_end)
+				currentPos = ((*ci).value + (*(ci + 1)).value) * 0.5f;
+			else
+				currentPos = (*ci).value;			
+
 			sum = pvsl * ((*ci).value - minBox) + pvsr * (maxBox - (*ci).value);
-
-			//Debug  << "pos=" << (*ci).value << "\t pvs=(" <<  pvsl << "," << pvsr << ")" << "\t cost= " << sum << endl;
+			Debug  << "pos=" << (*ci).value << "\t newpos=" << currentPos << "\t pvs=(" <<  pvsl << "," << pvsr << ")" << "\t cost= " << sum << endl;
 
 			if (sum < minSum)
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/PreprocessorThread.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/PreprocessorThread.cpp	(revision 1145)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/PreprocessorThread.cpp	(revision 1146)
@@ -1,24 +1,8 @@
 //#include <QApplication>
 #include "PreprocessorThread.h"
-#include "Camera.h"
-#include "KdTree.h"
-#include "SceneGraph.h"
-#include "Preprocessor.h"
 
 
 namespace GtpVisibilityPreprocessor {
 
-
-// matt: remove qt dependencies
-/*
-PreprocessorThread::PreprocessorThread(Preprocessor *p,
-									   QObject *parent):QThread(parent)
-{
-  mPreprocessor = p;
-  
-  if (p->mQuitOnFinish)
-	connect(this, SIGNAL(finished()), qApp, SLOT(closeAllWindows(void)));
-}
-*/
 
 PreprocessorThread::PreprocessorThread(Preprocessor *p):
@@ -28,50 +12,6 @@
 
 
-void PreprocessorThread::operator()()
-{
-	Main();
-}
-
-void PreprocessorThread::Main()
-{
-	Camera camera;
-
-	if (0) 
-	{
-		// camera.LookAtBox(mPreprocessor->mKdTree->GetBox());
-		//	camera.LookInBox(mPreprocessor->mKdTree->GetBox());
-		camera.SetPosition(Vector3(3473, 6.778, -1699));
-		camera.SetDirection(Vector3(-0.2432, 0, 0.97));
-		//	camera.SetPosition(Vector3(991.7, 187.8, -271));
-		//	camera.SetDirection(Vector3(0.9, 0, -0.4));
-
-		camera.SnapImage("camera.jpg", mPreprocessor->mKdTree, mPreprocessor->mSceneGraph);
-	} 
-
-	if (0) {
-		camera.LookInBox(mPreprocessor->mKdTree->GetBox());
-		camera.SetPosition(camera.mPosition + Vector3(-250,0,-550));
-		camera.SnapImage("camera2.jpg", mPreprocessor->mKdTree, mPreprocessor->mSceneGraph);
-	}
-
-	if (0) {
-		camera.SetPosition( mPreprocessor->mKdTree->GetBox().Center() - Vector3(0,-100,0) );
-		camera.SetDirection(Vector3(1, 0, 0));
-		camera.SnapImage("camera3.jpg", mPreprocessor->mKdTree, mPreprocessor->mSceneGraph);
-	}
-
-	if (mPreprocessor->mComputeVisibility) {
-		mPreprocessor->ComputeVisibility();
-		//	mPreprocessor->ExportPreprocessedData("scene.vis");
-		mPreprocessor->PostProcessVisibility();
-	}
-
-	cerr << "Preprocessor main finished...\n";
-  
-}
-
 PreprocessorThread::~PreprocessorThread()
 {
-  cerr<<"Preprocessor thread destructor...\n";
 }
 
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 1146)
@@ -0,0 +1,80 @@
+#include "BoostPreprocessorThread.h"
+#include "Camera.h"
+#include "KdTree.h"
+#include "SceneGraph.h"
+#include "Preprocessor.h"
+#include <boost/thread/thread.hpp>
+
+namespace GtpVisibilityPreprocessor {
+
+
+BoostPreprocessorThread::BoostPreprocessorThread(Preprocessor *p):
+PreprocessorThread(p), mThread(NULL)
+{
+}
+
+
+void BoostPreprocessorThread::operator()()
+{
+	Main();
+}
+
+
+void BoostPreprocessorThread::Main()
+{
+	Camera camera;
+
+	if (0) 
+	{
+		// camera.LookAtBox(mPreprocessor->mKdTree->GetBox());
+		//	camera.LookInBox(mPreprocessor->mKdTree->GetBox());
+		camera.SetPosition(Vector3(3473, 6.778, -1699));
+		camera.SetDirection(Vector3(-0.2432, 0, 0.97));
+		//	camera.SetPosition(Vector3(991.7, 187.8, -271));
+		//	camera.SetDirection(Vector3(0.9, 0, -0.4));
+
+		camera.SnapImage("camera.jpg", mPreprocessor->mKdTree, mPreprocessor->mSceneGraph);
+	} 
+
+	if (0) {
+		camera.LookInBox(mPreprocessor->mKdTree->GetBox());
+		camera.SetPosition(camera.mPosition + Vector3(-250,0,-550));
+		camera.SnapImage("camera2.jpg", mPreprocessor->mKdTree, mPreprocessor->mSceneGraph);
+	}
+
+	if (0) {
+		camera.SetPosition( mPreprocessor->mKdTree->GetBox().Center() - Vector3(0,-100,0) );
+		camera.SetDirection(Vector3(1, 0, 0));
+		camera.SnapImage("camera3.jpg", mPreprocessor->mKdTree, mPreprocessor->mSceneGraph);
+	}
+
+	if (mPreprocessor->mComputeVisibility) {
+		mPreprocessor->ComputeVisibility();
+		//	mPreprocessor->ExportPreprocessedData("scene.vis");
+		mPreprocessor->PostProcessVisibility();
+	}
+
+	cerr << "Preprocessor main finished...\n";
+  
+}
+
+
+BoostPreprocessorThread::~BoostPreprocessorThread()
+{
+	cerr<<"Boost Preprocessor thread destructor...\n";
+	DEL_PTR(mThread);
+}
+
+
+void BoostPreprocessorThread::InitThread()
+{
+	mThread = new boost::thread(*this);
+}
+
+
+void BoostPreprocessorThread::RunThread()
+{
+	mThread->join();
+}
+ 
+}
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp	(revision 1145)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp	(revision 1146)
@@ -11,25 +11,10 @@
 #include "Environment.h"
 
-
-//#define GL_GLEXT_PROTOTYPES
-
-
-#include <Cg/cg.h>
-#include <Cg/cgGL.h>
-
-
-#include <QVBoxLayout>
+//#include <Cg/cg.h>
+//#include <Cg/cgGL.h>
+
 
 namespace GtpVisibilityPreprocessor {
 
-
-/*
-GLuint frontDepthMap;
-GLuint backDepthMap;
-
-const int depthMapSize = 512;
-
-//static vector<OcclusionQuery *> sQueries;
-*/
 
 static bool arbQuerySupport = false;
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/PreprocessorThread.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/PreprocessorThread.h	(revision 1145)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/PreprocessorThread.h	(revision 1146)
@@ -1,8 +1,8 @@
 #ifndef __PREPROCESSOR_THREAD_H
 #define __PREPROCESSOR_THREAD_H
-// matt: remove qt dependencies
-//#include <QThread>
 
-namespace GtpVisibilityPreprocessor {
+
+namespace GtpVisibilityPreprocessor 
+{
 
 class Preprocessor;
@@ -10,22 +10,17 @@
 /** This class represents a preprocessor thread.
 */
-class PreprocessorThread//: public QThread
+class PreprocessorThread
 {
-  //Q_OBJECT
+public:
+  	PreprocessorThread(Preprocessor *p);
+	virtual ~PreprocessorThread();
 
-  Preprocessor *mPreprocessor;
-public:
-  //PreprocessorThread(Preprocessor *p, QObject *parent = 0);
-	PreprocessorThread(Preprocessor *p);
-  ~PreprocessorThread();
+	virtual void InitThread() = 0;
+	virtual void RunThread() = 0;
 
-  void operator()();
-
-  void Main();
-
-/*protected:
-  void run() {
-	Main();
-  }*/
+protected:
+	virtual void Main() = 0;
+ 
+	Preprocessor *mPreprocessor;
 };
 
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp	(revision 1145)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/main.cpp	(revision 1146)
@@ -12,12 +12,7 @@
 #include "ViewCell.h"
 #include "SceneGraph.h"
-#include "PreprocessorThread.h"
+#include "BoostPreprocessorThread.h"
 #include "RenderSampler.h"
 #include "ResourceManager.h"
-
-//#include <QApplication>
-//#include <QtOpenGL>
-#include <boost/thread/thread.hpp>
-#include <boost/thread/xtime.hpp>
 #include "GlRenderer.h"
 
@@ -29,16 +24,10 @@
 
 Preprocessor *preprocessor = NULL;
-
-#if QT_ENABLED
-QApplication *app = NULL;
-#endif
+GlRenderWidget *renderWidget = NULL;
 
 
 void Cleanup()
 {
-#if QT_ENABLED
-	DEL_PTR(rendererWidget);
-#endif
-
+	DEL_PTR(renderWidget);
 	DEL_PTR(preprocessor);
 
@@ -51,6 +40,13 @@
 void DisplayWidget()
 {
+	// note matt: capsulate qt dependent code as good as possible
+	renderWidget = 
+		new GlRenderWidget(preprocessor->mSceneGraph, 
+						   preprocessor->mViewCellsManager, 
+						   preprocessor->mKdTree);
+
+	renderWidget->Show();
+
 #if QT_ENABLED
-	QApplication *app = NULL;
 
 	// create a qt application first (must be created before any opengl widget ...)
@@ -175,5 +171,5 @@
 	// create a preprocessor thread
 	//PreprocessorThread *pt = new PreprocessorThread(p, app);
-	PreprocessorThread pt(preprocessor);
+	BoostPreprocessorThread pt(preprocessor);
 
 	if (preprocessor->mUseGlRenderer || preprocessor->mUseGlDebugger)
@@ -182,8 +178,7 @@
 		DisplayWidget();
 
-		// create and run the thread
-		boost::thread thrd(pt);
-		thrd.join();
-		//pt->start(QThread::LowPriority);
+		// create and run the preprocessor application in a parallel thread
+		pt.InitThread();
+		pt.RunThread();
 	} 
 	else
@@ -193,11 +188,4 @@
 	}
 
-#if QT_ENABLED
-	if (app)
-	{
-		returnCode = app->exec();
-        DEL_PTR(app);
-	}
-#endif
 
 	Cleanup();
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/BoostPreprocessorThread.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/BoostPreprocessorThread.h	(revision 1146)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/BoostPreprocessorThread.h	(revision 1146)
@@ -0,0 +1,37 @@
+#ifndef __BOOST_PREPROCESSOR_THREAD_H
+#define __BOOST_PREPROCESSOR_THREAD_H
+
+#include "PreprocessorThread.h"
+
+namespace boost {
+	class thread;
+}
+namespace GtpVisibilityPreprocessor {
+
+class Preprocessor;
+
+/** This class represents a preprocessor thread using boost.
+*/
+class BoostPreprocessorThread: public PreprocessorThread
+{
+public:
+	BoostPreprocessorThread(Preprocessor *p);
+	~BoostPreprocessorThread();
+
+	virtual void InitThread();
+	virtual void RunThread();
+
+	virtual void Main();
+
+	void operator()();
+
+protected:
+
+private:
+	
+	boost::thread *mThread;
+};
+
+}
+
+#endif
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.h
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.h	(revision 1145)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.h	(revision 1146)
@@ -1,12 +1,4 @@
 #ifndef __GLRENDERER_H
 #define __GLRENDERER_H
-
-//#include "glInterface.h"
-
-//#include <QWaitCondition>
-//#include <QtOpenGL>
-//#include <QGLPixelBuffer>
-
-//class QWidget;
 
 #include "Vector3.h"
@@ -82,5 +74,4 @@
 	derived classes
 */
-
 class GlRenderer: public Renderer
 {
@@ -151,5 +142,6 @@
 };
 
-
+/* Class implementing an OpenGl render buffer.
+*/
 class GlRendererBuffer: public GlRenderer
 {
@@ -253,4 +245,5 @@
 	*/
 	void EvalQueryWithItemBuffer();
+
 	/** Evaluates query for one direction using occlusion queries.
 	*/
@@ -263,6 +256,34 @@
 };
 
+
+/** Abstract class for implmenenting a gl render widget.
+*/
+class GlRenderWidget
+{
+public:
+	
+	GlRenderWidget(SceneGraph *sceneGraph, ViewCellsManager *vcm, KdTree *kdTree):
+	  mSceneGraph(sceneGraph), mViewCellsManager(vcm), mKdTree(kdTree)
+	{
+	}
+
+	
+	GlRenderWidget() {}
+
+    virtual ~GlRenderWidget() {}
+
+	//virtual void Create() {}
+	virtual void Show() {}
+	
+
+protected:
+
+
+	SceneGraph *mSceneGraph;
+	ViewCellsManager *mViewCellsManager;
+	KdTree *mKdTree;
+};
+
 };
 
 #endif
-
Index: /GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.cpp
===================================================================
--- /GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.cpp	(revision 1021)
+++ /GTP/trunk/Lib/Vis/Preprocessing/src/SamplingStrategy.cpp	(revision 1146)
@@ -51,5 +51,5 @@
 	Vector3 origin, direction; 
 
-    const int i = RandomValue(0, (int)mPreprocessor.mObjects.size() - 1);
+    const int i = (int)RandomValue(0, (int)mPreprocessor.mObjects.size() - 1);
 
 	Intersectable *object = mPreprocessor.mObjects[i];
Index: /GTP/trunk/Lib/Vis/shared/scripts/GtpVisibility.sln
===================================================================
--- /GTP/trunk/Lib/Vis/shared/scripts/GtpVisibility.sln	(revision 1011)
+++ /GTP/trunk/Lib/Vis/shared/scripts/GtpVisibility.sln	(revision 1146)
@@ -31,4 +31,8 @@
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IVReader", "..\..\OnlineCullingCHC\IVReader\scripts\IVReader.vcproj", "{7319E499-473D-4CE5-9983-725D6E68A55D}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QtRenderer", "..\..\QtRenderer\QtRenderer.vcproj", "{B85DC7B1-58B6-4912-BD64-8B452630A368}"
 	ProjectSection(ProjectDependencies) = postProject
 	EndProjectSection
@@ -68,4 +72,8 @@
 		{7319E499-473D-4CE5-9983-725D6E68A55D}.Release.ActiveCfg = Release|Win32
 		{7319E499-473D-4CE5-9983-725D6E68A55D}.Release.Build.0 = Release|Win32
+		{B85DC7B1-58B6-4912-BD64-8B452630A368}.Debug.ActiveCfg = Debug|Win32
+		{B85DC7B1-58B6-4912-BD64-8B452630A368}.Debug.Build.0 = Debug|Win32
+		{B85DC7B1-58B6-4912-BD64-8B452630A368}.Release.ActiveCfg = Release|Win32
+		{B85DC7B1-58B6-4912-BD64-8B452630A368}.Release.Build.0 = Release|Win32
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
Index: /GTP/trunk/Lib/Vis/QtRenderer/QtGlRenderer .cpp
===================================================================
--- /GTP/trunk/Lib/Vis/QtRenderer/QtGlRenderer .cpp	(revision 1146)
+++ /GTP/trunk/Lib/Vis/QtRenderer/QtGlRenderer .cpp	(revision 1146)
@@ -0,0 +1,529 @@
+#include "Mesh.h"
+#include "glInterface.h"
+#include "OcclusionQuery.h"
+#include "GlRenderer.h"
+#include "ViewCellsManager.h"
+#include "SceneGraph.h"
+#include "Pvs.h"
+#include "Viewcell.h"
+#include "Beam.h"
+#include "KdTree.h"
+#include "Environment.h"
+
+
+namespace GtpVisibilityPreprocessor {
+
+
+static bool arbQuerySupport = false;
+static bool nvQuerySupport = false;
+
+
+static void InitExtensions() 
+{
+	GLenum err = glewInit();
+
+	if (GLEW_OK != err) 
+	{
+		// problem: glewInit failed, something is seriously wrong
+		cerr << "Error: " << glewGetErrorString(err) << endl;
+		exit(1);
+	}
+
+	if (GLEW_ARB_occlusion_query) 
+		arbQuerySupport = true;
+	
+	if (GLEW_NV_occlusion_query) 
+		nvQuerySupport = true;
+	
+
+	if  (!arbQuerySupport && !nvQuerySupport)
+	{
+		cout << "I require the GL_ARB_occlusion_query or the GL_NV_occlusion_query OpenGL extension to work.\n";
+		exit(1);
+	}
+}
+
+
+GlRenderer::GlRenderer(SceneGraph *sceneGraph,
+					   ViewCellsManager *viewCellsManager,
+					   KdTree *tree):
+  Renderer(sceneGraph, viewCellsManager),
+  mKdTree(tree)
+{
+  mSceneGraph->CollectObjects(&mObjects);
+
+  //  mViewCellsManager->GetViewPoint(mViewPoint);
+
+  mViewPoint = mSceneGraph->GetBox().Center();
+  mViewDirection = Vector3(0,0,1);
+
+  //  mViewPoint = Vector3(991.7, 187.8, -271);
+  //  mViewDirection = Vector3(0.9, 0, -0.4);
+
+  //  timerId = startTimer(10);
+  // debug coords for atlanta
+  //  mViewPoint = Vector3(3473, 6.778, -1699);
+  //  mViewDirection = Vector3(-0.2432, 0, 0.97);
+  
+  mFrame = 0;
+  mWireFrame = false;
+  Environment::GetSingleton()->GetBoolValue("Preprocessor.detectEmptyViewSpace", mDetectEmptyViewSpace);
+  mSnapErrorFrames = true;
+  mSnapPrefix = "snap/";
+  mUseForcedColors = false;
+
+  mUseGlLists = true;
+  //mUseGlLists = false;
+}
+
+GlRenderer::~GlRenderer()
+{
+  cerr<<"gl renderer destructor..\n";
+ 
+  //CLEAR_CONTAINER(sQueries);
+  CLEAR_CONTAINER(mOcclusionQueries);
+
+  cerr<<"done."<<endl;
+}
+
+
+void
+GlRenderer::RenderIntersectable(Intersectable *object)
+{
+
+  glPushAttrib(GL_CURRENT_BIT);
+  if (mUseFalseColors)
+	SetupFalseColor(object->mId);
+  
+
+  switch (object->Type()) {
+  case Intersectable::MESH_INSTANCE:
+	RenderMeshInstance((MeshInstance *)object);
+	break;
+  case Intersectable::VIEW_CELL:
+	  RenderViewCell(dynamic_cast<ViewCell *>(object));
+	  break;
+  case Intersectable::TRANSFORMED_MESH_INSTANCE:
+	  RenderTransformedMeshInstance(dynamic_cast<TransformedMeshInstance *>(object));
+	  break;
+  default:
+	cerr<<"Rendering this object not yet implemented\n";
+	break;
+  }
+
+  glPopAttrib();
+}
+
+
+void
+GlRenderer::RenderViewCell(ViewCell *vc)
+{
+  if (vc->GetMesh()) {
+
+	if (!mUseFalseColors) {
+	  if (vc->GetValid()) 
+		glColor3f(0,1,0);
+	  else
+		glColor3f(0,0,1);
+	}
+	
+	RenderMesh(vc->GetMesh());
+  } else {
+	// render viewcells in the subtree
+	if (!vc->IsLeaf()) {
+	  ViewCellInterior *vci = (ViewCellInterior *) vc;
+
+	  ViewCellContainer::iterator it = vci->mChildren.begin();
+	  for (; it != vci->mChildren.end(); ++it) {
+		RenderViewCell(*it);
+	  }
+	} else {
+	  //	  cerr<<"Empty viewcell mesh\n";
+	}
+  }
+}
+
+
+void
+GlRenderer::RenderMeshInstance(MeshInstance *mi)
+{
+  RenderMesh(mi->GetMesh());
+}
+
+
+void
+GlRenderer::RenderTransformedMeshInstance(TransformedMeshInstance *mi)
+{
+	// apply world transform before rendering
+	Matrix4x4 m;
+	mi->GetWorldTransform(m);
+
+	glPushMatrix();
+/* cout << "\n";
+	for (int i = 0; i < 4; ++ i)
+		for (int j = 0; j < 4; ++ j)
+			cout << m.x[i][j] << " "; cout << "\n"*/
+
+	glMultMatrixf((float *)m.x);
+
+	/*GLfloat dummy[16];
+	glGetFloatv(GL_MODELVIEW_MATRIX, dummy);
+	for (int i = 0; i < 16; ++ i)
+		cout << dummy[i] << " ";
+	cout << endl;*/
+	RenderMesh(mi->GetMesh());
+	
+	glPopMatrix();
+}
+
+
+void
+GlRenderer::SetupFalseColor(const int id)
+{
+  // swap bits of the color
+  glColor3ub(id&255, (id>>8)&255, (id>>16)&255);
+}
+
+
+int GlRenderer::GetId(int r, int g, int b) const
+{
+	return r + (g << 8) + (b << 16);
+}
+
+void
+GlRenderer::SetupMaterial(Material *m)
+{
+  if (m)
+	glColor3fv(&(m->mDiffuseColor.r));
+}
+
+void
+GlRenderer::RenderMesh(Mesh *mesh)
+{
+  int i = 0;
+
+  if (!mUseFalseColors && !mUseForcedColors)
+	SetupMaterial(mesh->mMaterial);
+  
+  for (i=0; i < mesh->mFaces.size(); i++) {
+	if (mWireFrame)
+	  glBegin(GL_LINE_LOOP);
+	else
+	  glBegin(GL_POLYGON);
+
+	Face *face = mesh->mFaces[i];
+	for (int j = 0; j < face->mVertexIndices.size(); j++) {
+	  glVertex3fv(&mesh->mVertices[face->mVertexIndices[j]].x);
+	}
+	glEnd();
+  }
+}
+	
+void
+GlRenderer::InitGL()
+{
+  glMatrixMode(GL_PROJECTION);
+  glLoadIdentity();
+  
+  glMatrixMode(GL_MODELVIEW);
+  glLoadIdentity();
+
+  glEnable(GL_CULL_FACE);
+  glShadeModel(GL_FLAT);
+  glEnable(GL_DEPTH_TEST);
+  glEnable(GL_CULL_FACE);
+  
+  InitExtensions();
+  
+#if 0
+  GLfloat mat_ambient[]   = {  0.5, 0.5, 0.5, 1.0  };
+  /*  mat_specular and mat_shininess are NOT default values	*/
+  GLfloat mat_diffuse[]   = {  1.0, 1.0, 1.0, 1.0  };
+  GLfloat mat_specular[]  = {  0.3, 0.3, 0.3, 1.0  };
+  GLfloat mat_shininess[] = {  1.0  };
+  
+  GLfloat light_ambient[]  = {  0.2, 0.2, 0.2, 1.0  };
+  GLfloat light_diffuse[]  = {  0.4, 0.4, 0.4, 1.0  };
+  GLfloat light_specular[] = {  0.3, 0.3, 0.3, 1.0  };
+  
+  GLfloat lmodel_ambient[] = {  0.3, 0.3, 0.3, 1.0  };
+  
+  
+  // default Material
+  glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient);
+  glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse);
+  glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
+  glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess);
+
+  // a light
+  glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient);
+  glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse);
+  glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular);
+  
+  glLightfv(GL_LIGHT1, GL_AMBIENT, light_ambient);
+  glLightfv(GL_LIGHT1, GL_DIFFUSE, light_diffuse);
+  glLightfv(GL_LIGHT1, GL_SPECULAR, light_specular);
+  
+  glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient);
+  
+  glEnable(GL_LIGHTING);
+  glEnable(GL_LIGHT0);
+  glEnable(GL_LIGHT1);
+  
+  
+  // set position of the light
+  GLfloat infinite_light[] = {  1.0, 0.8, 1.0, 0.0  };
+  glLightfv (GL_LIGHT0, GL_POSITION, infinite_light);
+  
+  // set position of the light2
+  GLfloat infinite_light2[] = {  -0.3, 1.5, 1.0, 0.0  };
+  glLightfv (GL_LIGHT1, GL_POSITION, infinite_light2);
+  
+  glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
+  //   glColorMaterial( GL_FRONT_AND_BACK, GL_SPECULAR);
+  glEnable(GL_COLOR_MATERIAL);
+  
+  glShadeModel( GL_FLAT );
+  
+  glDepthFunc( GL_LESS );
+  glEnable( GL_DEPTH_TEST );
+#endif
+
+  glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE );
+
+  glEnable( GL_NORMALIZE );
+  
+  glClearColor(0.0f, 0.0f, 1.0f, 1.0f);
+}
+
+
+void
+GlRenderer::SetupProjection(const int w, const int h, const float angle)
+{
+  glViewport(0, 0, w, h);
+  glMatrixMode(GL_PROJECTION);
+  glLoadIdentity();
+  gluPerspective(angle, 1.0, 0.1, 2.0*Magnitude(mSceneGraph->GetBox().Diagonal()));
+  glMatrixMode(GL_MODELVIEW);
+}
+
+void
+GlRenderer::SetupCamera()
+{
+  Vector3 target = mViewPoint + mViewDirection;
+
+  Vector3 up(0,1,0);
+  
+  if (abs(DotProd(mViewDirection, up)) > 0.99f)
+	up = Vector3(1, 0, 0);
+  
+  glLoadIdentity();
+  gluLookAt(mViewPoint.x, mViewPoint.y, mViewPoint.z,
+			target.x, target.y, target.z,
+			up.x, up.y, up.z);
+}
+
+void
+GlRenderer::_RenderScene()
+{
+  ObjectContainer::const_iterator oi = mObjects.begin();
+
+  for (; oi != mObjects.end(); oi++)
+	RenderIntersectable(*oi);
+}
+
+bool
+GlRenderer::RenderScene()
+{
+  static int glList = -1;
+  if (mUseGlLists) {
+	if (glList == -1) {
+	  glList = glGenLists(1);
+	  glNewList(glList, GL_COMPILE);
+	  _RenderScene();
+	  glEndList();
+	}
+	glCallList(glList);
+  } else
+	_RenderScene();
+	
+  
+  return true;
+}
+
+
+void
+GlRendererBuffer::EvalQueryWithItemBuffer(
+										  //RenderCostSample &sample
+									   )
+{
+	// read back the texture
+	glReadPixels(0, 0,
+				GetWidth(), GetHeight(),
+				GL_RGBA,
+				GL_UNSIGNED_BYTE,
+				mPixelBuffer);
+		
+			
+	unsigned int *p = mPixelBuffer;
+			
+	for (int y = 0; y < GetHeight(); y++)
+	{
+		for (int x = 0; x < GetWidth(); x++, p++) 
+		{
+			unsigned int id = (*p) & 0xFFFFFF;
+
+			if (id != 0xFFFFFF)
+				++ mObjects[id]->mCounter;
+		}
+	}
+}
+
+
+
+/****************************************************************/
+/*               GlRendererBuffer implementation                */
+/****************************************************************/
+
+
+
+GlRendererBuffer::GlRendererBuffer(SceneGraph *sceneGraph,
+								   ViewCellsManager *viewcells,
+								   KdTree *tree):
+GlRenderer(sceneGraph, viewcells, tree)  
+{
+	mPixelBuffer = NULL;
+
+	// implement width and height in subclasses
+}
+
+
+void
+GlRendererBuffer::EvalQueryWithOcclusionQueries(
+									   //RenderCostSample &sample
+									   )
+{
+	glDepthFunc(GL_LEQUAL);
+		
+	glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
+	glDepthMask(GL_FALSE);
+
+
+	// simulate detectemptyviewspace using backface culling
+	if (mDetectEmptyViewSpace) 
+	{
+		glEnable(GL_CULL_FACE);
+		//cout << "culling" << endl;
+	}
+	else
+	{
+		//cout << "not culling" << endl;
+		glDisable(GL_CULL_FACE);
+	}
+
+	
+	//const int numQ = 1;
+	const int numQ = (int)mOcclusionQueries.size();
+	
+	//glFinish();
+#if 0
+	//-- now issue queries for all objects
+	for (int j = 0; j < (int)mObjects.size(); ++ j) 
+	{
+		mOcclusionQueries[j]->BeginQuery();
+		RenderIntersectable(mObjects[j]);
+		mOcclusionQueries[j]->EndQuery();
+
+		unsigned int pixelCount;
+
+		pixelCount = mOcclusionQueries[j]->GetQueryResult();
+		mObjects[j]->mCounter += pixelCount;
+	}
+#else
+
+	int q = 0;
+
+	//-- now issue queries for all objects
+	for (int j = 0; j < (int)mObjects.size(); j += q) 
+	{	
+		for (q = 0; ((j + q) < (int)mObjects.size()) && (q < numQ); ++ q) 
+		{
+			//glFinish();
+			mOcclusionQueries[q]->BeginQuery();
+			
+			RenderIntersectable(mObjects[j + q]);
+		
+			mOcclusionQueries[q]->EndQuery();
+			//glFinish();
+		}
+		//cout << "q: " << q << endl;
+		// collect results of the queries
+		for (int t = 0; t < q; ++ t) 
+		{
+			unsigned int pixelCount;
+		
+			//-- reenable other state
+#if 0
+			bool available;
+
+			do 
+			{
+				available = mOcclusionQueries[t]->ResultAvailable();
+				
+				if (!available) cout << "W";
+			} 
+			while (!available);
+#endif
+
+			pixelCount = mOcclusionQueries[t]->GetQueryResult();
+
+			//if (pixelCount > 0)
+			//	cout <<"o="<<j+q<<" q="<<mOcclusionQueries[q]->GetQueryId()<<" pc="<<pixelCount<<" ";
+			mObjects[j + t]->mCounter += pixelCount;
+		}
+
+		//j += q;
+	}
+#endif
+	//glFinish();
+	glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
+	glDepthMask(GL_TRUE);
+	
+	glEnable(GL_CULL_FACE);
+}
+
+
+void
+GlRendererBuffer::RandomViewPoint()
+{ 
+  // do not use this function since it could return different viewpoints for
+  // different executions of the algorithm
+
+  //  mViewCellsManager->GetViewPoint(mViewPoint);
+
+  while (1) {
+	Vector3 pVector = Vector3(halton.GetNumber(1),
+							  halton.GetNumber(2),
+							  halton.GetNumber(3));
+	
+	mViewPoint =  mViewCellsManager->GetViewSpaceBox().GetPoint(pVector);
+	ViewCell *v = mViewCellsManager->GetViewCell(mViewPoint);
+	if (v && v->GetValid())
+	  break;
+	// generate a new vector
+	halton.GenerateNext();
+  }
+  
+  Vector3 dVector = Vector3(2*M_PI*halton.GetNumber(4),
+							M_PI*halton.GetNumber(5),
+							0.0f);
+  
+  mViewDirection = Normalize(Vector3(sin(dVector.x),
+									 //									 cos(dVector.y),
+									 0.0f,
+									 cos(dVector.x)));
+  halton.GenerateNext();
+}
+
+
+}
Index: /GTP/trunk/Lib/Vis/QtRenderer/QtGlRenderer.h
===================================================================
--- /GTP/trunk/Lib/Vis/QtRenderer/QtGlRenderer.h	(revision 1146)
+++ /GTP/trunk/Lib/Vis/QtRenderer/QtGlRenderer.h	(revision 1146)
@@ -0,0 +1,223 @@
+#ifndef __GLRENDERER_H
+#define __GLRENDERER_H
+
+
+
+
+namespace GtpVisibilityPreprocessor {
+
+class GlRenderer: public Renderer
+{
+
+public:
+  ObjectContainer mObjects;
+   
+  Vector3 mViewPoint;
+  Vector3 mViewDirection;
+
+  int timerId;
+  bool mUseFalseColors;
+  bool mUseForcedColors;
+
+  HaltonSequence halton;
+  
+  int mFrame;
+  bool mWireFrame;
+  
+  bool mDetectEmptyViewSpace;
+  bool mSnapErrorFrames;
+
+  bool mUseGlLists;
+  
+  string mSnapPrefix;
+
+  KdTree *mKdTree;
+
+  //QWaitCondition mRenderingFinished;
+  
+  vector<OcclusionQuery *> mOcclusionQueries;
+  
+  GlRenderer(SceneGraph *sceneGraph,
+			 ViewCellsManager *viewcells,
+			 KdTree *tree);
+  
+  virtual ~GlRenderer();
+
+
+  void SetupFalseColor(const int id);
+  void RenderIntersectable(Intersectable *);
+  void RenderViewCell(ViewCell *vc);
+  void RenderMeshInstance(MeshInstance *mi);
+  void RenderTransformedMeshInstance(TransformedMeshInstance *mi);
+  void RenderMesh(Mesh *m);
+  void SetupMaterial(Material *m);
+  virtual void SetupCamera();
+  
+  bool
+  RenderScene();
+
+  void
+  _RenderScene();
+
+
+  virtual void
+  SetupProjection(const int w, const int h, const float angle = 70.0f);
+
+  
+  
+
+  void InitGL();
+
+  virtual int GetWidth() const = 0;
+  virtual int GetHeight() const = 0;
+
+  int GetId(int r, int g, int b) const;
+};
+
+
+/* Class implementing an OpenGl render buffer.
+*/
+class GlRendererBuffer: public GlRenderer
+{
+
+//Q_OBJECT
+public:
+GlRendererBuffer(SceneGraph *sceneGraph,
+				 ViewCellsManager *viewcells,
+				 KdTree *tree);
+
+
+	/** Evaluates render cost of a point sample.
+		@param sample the render cost sample to be evaluated
+		@param useOcclusionQueries if occlusion queries should be used or item buffer
+		@param threshold number of pixels / samples from where an object is considered visible.
+	*/
+	void EvalRenderCostSample(RenderCostSample &sample,
+							  const bool useOcclusionQueries,
+							  const int threshold);
+
+	/** Evaluates render cost of a number of point samples. The point samples
+		are distributed uniformly over the defined view space.
+
+		@param numSamples the number of point samples taken
+		@param samples stores the taken point samples in a container
+		@param useOcclusionQueries if occlusion queries should be used or item buffer
+		@param threshold number of pixels / samples from where an object is considered visible.
+	*/
+	void SampleRenderCost(const int numSamples, 
+						  vector<RenderCostSample> &samples,
+						  const bool useOcclusionQueries,
+						  const int threshold = 0)
+	{}
+
+	/** Implerment in subclasses.
+	*/
+	void EvalPvsStat() {};
+
+	void ClearErrorBuffer();
+  
+
+  virtual int GetWidth() const { return 0; }
+  virtual int GetHeight() const { return 0; }
+
+
+  void RandomViewPoint();
+  void SampleBeamContributions(
+							   Intersectable *sourceObject,
+							   Beam &beam,
+							   const int samples,
+							   BeamSampleStatistics &stat
+							   );
+
+  void
+  SampleViewpointContributions(
+							   Intersectable *sourceObject,
+							   const Vector3 viewPoint,
+							   Beam &beam,
+							   const int desiredSamples,
+							   BeamSampleStatistics &stat
+							   );
+
+  void InitGL();
+
+  /** Computes rays from information gained with hw sampling-
+  */
+  void ComputeRays(Intersectable *sourceObj, VssRayContainer &rays);
+
+  int ComputePvs() const;
+
+  float
+  GetPixelError(int &pvsSize);
+
+  int ComputePvs(ObjectContainer &objects, ObjectContainer &pvs) const;
+
+  PvsRenderStatistics mPvsStat;
+   
+  int mPvsStatFrames;
+  struct PvsErrorEntry {
+	  PvsErrorEntry() {}
+	  float mError;
+	  int mPvsSize;
+	  Vector3 mPosition;
+	  Vector3 mDirection;
+  };
+  
+  vector<PvsErrorEntry> mPvsErrorBuffer;
+
+  
+protected:
+	unsigned int *mPixelBuffer;
+  
+	static void GenQueries(const int numQueries);
+	
+	void SetupProjectionForViewPoint(const Vector3 &viewPoint, 
+									 const Beam &beam, 
+
+									 Intersectable *sourceObject);
+
+	/** Evaluates query for one direction using item buffer.
+	*/
+	void EvalQueryWithItemBuffer();
+	/** Evaluates query for one direction using occlusion queries.
+	*/
+	void EvalQueryWithOcclusionQueries();
+
+public:
+	// matt: remove qt dependencies
+ // signals:
+//	void UpdatePvsErrorItem(int i, GlRendererBuffer::PvsErrorEntry &);
+};
+
+
+/** Abstract class for implmenenting a gl render widget.
+*/
+class GlRenderWidget
+{
+public:
+	
+	GlRenderWidget(SceneGraph *sceneGraph, ViewCellsManager *vcm, KdTree *kdTree):
+	  mSceneGraph(sceneGraph), mViewCellsManager(vcm), mKdTree(kdTree)
+	{
+	}
+
+	
+	GlRenderWidget() {}
+
+    virtual ~GlRenderWidget() {}
+
+	//virtual void Create() {}
+	virtual void Show() {}
+	
+
+protected:
+
+
+	SceneGraph *mSceneGraph;
+	ViewCellsManager *mViewCellsManager;
+	KdTree *mKdTree;
+};
+
+};
+
+#endif
+
Index: /GTP/trunk/Lib/Vis/QtRenderer/QtRenderer.vcproj
===================================================================
--- /GTP/trunk/Lib/Vis/QtRenderer/QtRenderer.vcproj	(revision 1146)
+++ /GTP/trunk/Lib/Vis/QtRenderer/QtRenderer.vcproj	(revision 1146)
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="QtRenderer"
+	ProjectGUID="{B85DC7B1-58B6-4912-BD64-8B452630A368}"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="Debug"
+			IntermediateDirectory="Debug"
+			ConfigurationType="2"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;QTRENDERER_EXPORTS"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="4"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/QtRenderer.dll"
+				LinkIncremental="2"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile="$(OutDir)/QtRenderer.pdb"
+				SubSystem="2"
+				ImportLibrary="$(OutDir)/QtRenderer.lib"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="Release"
+			IntermediateDirectory="Release"
+			ConfigurationType="2"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;QTRENDERER_EXPORTS"
+				RuntimeLibrary="0"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/QtRenderer.dll"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				ImportLibrary="$(OutDir)/QtRenderer.lib"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
