Index: GTP/trunk/Lib/Vis/Preprocessing/src/IntelRayCaster.h
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/IntelRayCaster.h	(revision 1528)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/IntelRayCaster.h	(revision 1925)
@@ -20,4 +20,5 @@
 struct SimpleRay;
 
+
 /** This class provides an interface for ray casting.
 */
@@ -27,29 +28,27 @@
 	/** Default constructor initialising e.g., KD tree and BSP tree.
 	*/
-	IntelRayCaster(
-		const Preprocessor &preprocessor,
-		const string externKdTree);
+	IntelRayCaster(const Preprocessor &preprocessor,
+				   const string externKdTree);
 
 	virtual ~IntelRayCaster();
 
-	int Type() const { return INTEL_RAYCASTER; }
+	int Type() const 
+	{ 
+		return INTEL_RAYCASTER; 
+	}
 
-	virtual int CastRay(
-		const SimpleRay &simpleRay,
-        VssRayContainer &vssRays,
-		const AxisAlignedBox3 &box,
-		const bool castDoubleRay,
-		const bool pruneInvalidRays = true
-		);
+	virtual int CastRay(const SimpleRay &simpleRay,
+						VssRayContainer &vssRays,
+						const AxisAlignedBox3 &box,
+						const bool castDoubleRay,
+						const bool pruneInvalidRays = true);
 
-	 virtual void CastRays16(
-		 const int i,
-		 SimpleRayContainer &rays, 
-		 VssRayContainer &vssRays,
-		 const AxisAlignedBox3 &sbox,
-		 const bool castDoubleRay,
-		 const bool pruneInvalidRays = true
-		 );
-	 
+	virtual void CastRays16(const int i,
+							SimpleRayContainer &rays, 
+							VssRayContainer &vssRays,
+							const AxisAlignedBox3 &sbox,
+							const bool castDoubleRay,
+							const bool pruneInvalidRays = true);
+
 protected:
 
Index: GTP/trunk/Lib/Vis/Preprocessing/src/QtGlRenderer/QtGlRenderer.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/QtGlRenderer/QtGlRenderer.cpp	(revision 1841)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/QtGlRenderer/QtGlRenderer.cpp	(revision 1925)
@@ -23,6 +23,6 @@
 static CGprofile sCgFragmentProfile;
 
-GLuint frontDepthMap;
-GLuint backDepthMap;
+static GLuint frontDepthMap;
+static GLuint backDepthMap;
 
 const int depthMapSize = 512;
@@ -213,152 +213,159 @@
 QtGlRendererBuffer::GetPixelError(int &pvsSize)
 {
-  float pErrorPixels = -1.0f;
-  
-  glReadBuffer(GL_BACK);
-  
-  //  mUseFalseColors = true;
-  
-  mUseFalseColors = false;
-  unsigned int pixelCount;
-
-  //static int query = -1;
-  //if (query == -1)
-//	  glGenOcclusionQueriesNV(1, (unsigned int *)&query);
-
-  OcclusionQuery query;
-
-  if (mDetectEmptyViewSpace) {
-	// now check whether any backfacing polygon would pass the depth test
-	SetupCamera();
-	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-	glEnable( GL_CULL_FACE );
-	
-	RenderScene();
-	
-	glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
-	glDepthMask(GL_FALSE);
-	glDisable( GL_CULL_FACE );
-
-	
-	query.BeginQuery();
-	
-	RenderScene();
-	
-	query.EndQuery();
-	
-	// at this point, if possible, go and do some other computation
-	glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
-	glDepthMask(GL_TRUE);
-	glEnable( GL_CULL_FACE );
-	
-	// reenable other state
-	pixelCount = query.GetQueryResult();
-	
-	if (pixelCount > 0)
-	  return -1.0f; // backfacing polygon found -> not a valid viewspace sample
-  } else
-	glDisable( GL_CULL_FACE );
-	
-
-  ViewCell *viewcell = NULL;
-  
-  PrVs prvs;
-  
-  mViewCellsManager->SetMaxFilterSize(0);
-  mViewCellsManager->GetPrVS(mViewPoint, prvs, mViewCellsManager->GetFilterWidth());
-  viewcell = prvs.mViewCell;
-  
-  //  ViewCell *viewcell = mViewCellsManager->GetViewCell(mViewPoint);
-  pvsSize = 0;
-  if (viewcell) {
-	SetupCamera();
-	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
-	glColorMask(GL_FALSE, GL_TRUE, GL_FALSE, GL_FALSE);
-	
-	// Render PVS
-	ObjectPvsMap::const_iterator it = viewcell->GetPvs().mEntries.begin();
-
-	pvsSize = viewcell->GetPvs().mEntries.size();
-	
-	for (; it != viewcell->GetPvs().mEntries.end(); ++ it) {
-	  Intersectable *object = (*it).first;
-	  RenderIntersectable(object);
-	}
-
-	//	glColorMask(GL_TRUE, GL_FALSE, GL_FALSE, GL_FALSE);
-	glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
-	mUseFalseColors = true;
-
-	query.BeginQuery();
-
-	SetupCamera();
-
-	RenderScene();
-	
-	query.EndQuery();
-	
-
+	float pErrorPixels = -1.0f;
+
+	glReadBuffer(GL_BACK);
+
+	mUseFalseColors = false;
 	unsigned int pixelCount;
-	// reenable other state
-	pixelCount = query.GetQueryResult();
-	
-	
-	pErrorPixels = ((float)pixelCount)/(GetWidth()*GetHeight());
-	if (mSnapErrorFrames && pErrorPixels > 0.01) {
-	  
-	  char filename[256];
-	  sprintf(filename, "error-frame-%04d-%0.5f.png", mFrame, pErrorPixels);
-	  QImage im = toImage();
-	  string str = mSnapPrefix + filename;
-	  QString qstr(str.c_str());
-
-	  im.save(qstr, "PNG");
-	  if (1) { //0 && mFrame == 1543) {
-		int x,y;
-		int lastIndex = -1;
-		for (y=0; y < im.height(); y++)
-		  for (x=0; x < im.width(); x++) {
-			QRgb p = im.pixel(x,y);
-			int index = qRed(p) + (qGreen(p)<<8) + (qBlue(p)<<16);
-			if (qGreen(p) != 255 && index!=0) {
-			  if (index != lastIndex) {
-				//				Debug<<"ei="<<index<<" ";
-				lastIndex = index;
-			  }
+
+	OcclusionQuery query;
+
+	if (mDetectEmptyViewSpace) 
+	{
+		// now check whether any backfacing polygon would pass the depth test
+		SetupCamera();
+		glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+		glEnable( GL_CULL_FACE );
+
+		RenderScene();
+
+		glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
+		glDepthMask(GL_FALSE);
+		glDisable( GL_CULL_FACE );
+
+
+		query.BeginQuery();
+
+		RenderScene();
+
+		query.EndQuery();
+
+		// at this point, if possible, go and do some other computation
+		glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
+		glDepthMask(GL_TRUE);
+		glEnable( GL_CULL_FACE );
+
+		// reenable other state
+		pixelCount = query.GetQueryResult();
+
+		if (pixelCount > 0)
+			return -1.0f; // backfacing polygon found -> not a valid viewspace sample
+	} 
+	else
+	{
+		glDisable( GL_CULL_FACE );
+	}
+
+	ViewCell *viewcell = NULL;
+
+	PrVs prvs;
+
+	mViewCellsManager->SetMaxFilterSize(0);
+	mViewCellsManager->GetPrVS(mViewPoint, prvs, mViewCellsManager->GetFilterWidth());
+	viewcell = prvs.mViewCell;
+
+	// ViewCell *viewcell = mViewCellsManager->GetViewCell(mViewPoint);
+	pvsSize = 0;
+	if (viewcell) 
+	{
+		SetupCamera();
+		glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+		glColorMask(GL_FALSE, GL_TRUE, GL_FALSE, GL_FALSE);
+
+		// Render PVS
+		ObjectPvsIterator pit = viewcell->GetPvs().GetIterator();
+
+		while (pit.HasMoreEntries())
+		{		
+			const ObjectPvsEntry &entry = pit.Next();
+			Intersectable *obj = entry.mObject;
+
+			RenderIntersectable(obj);
+		}
+
+		// glColorMask(GL_TRUE, GL_FALSE, GL_FALSE, GL_FALSE);
+		glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
+		mUseFalseColors = true;
+
+		query.BeginQuery();
+
+		SetupCamera();
+
+		RenderScene();
+
+		query.EndQuery();
+
+		unsigned int pixelCount;
+		// reenable other state
+		pixelCount = query.GetQueryResult();
+
+		pErrorPixels = ((float)pixelCount)/(GetWidth()*GetHeight());
+		if (mSnapErrorFrames && pErrorPixels > 0.01) 
+		{
+            char filename[256];
+
+			sprintf(filename, "error-frame-%04d-%0.5f.png", mFrame, pErrorPixels);
+			QImage im = toImage();
+			string str = mSnapPrefix + filename;
+			QString qstr(str.c_str());
+
+			im.save(qstr, "PNG");
+			if (1) 
+			{
+				int x,y;
+				int lastIndex = -1;
+				for (y=0; y < im.height(); y++)
+				{
+					for (x=0; x < im.width(); x++) 
+					{
+						QRgb p = im.pixel(x,y);
+
+						int index = qRed(p) + (qGreen(p)<<8) + (qBlue(p)<<16);
+						
+						if (qGreen(p) != 255 && index!=0) 
+						{
+							if (index != lastIndex) 
+							{
+								lastIndex = index;
+							}
+						}
+					}
+				}
 			}
-		  }
-	  }
-
-
-	  mUseFalseColors = false;
-	  glPushAttrib(GL_CURRENT_BIT);
-	  glColor3f(0,1,0);
-	  glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
-	  SetupCamera();
-	  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-	  
-	  // Render PVS
-	  ObjectPvsMap::const_iterator it = viewcell->GetPvs().mEntries.begin();
-	  
-	  for (; it != viewcell->GetPvs().mEntries.end(); ++ it) {
-		Intersectable *object = (*it).first;
-		RenderIntersectable(object);
-	  }
-
-	  im = toImage();
-	  sprintf(filename, "error-frame-%04d-%0.5f-pvs.png", mFrame, pErrorPixels);
-	  str = mSnapPrefix + filename;
-	  qstr = str.c_str();
-	  im.save(qstr, "PNG");
-	  glPopAttrib();
-	}
-	glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
-  }
-
-  if (viewcell && mViewCellsManager->GetMaxFilterSize() > 0)
-	mViewCellsManager->DeleteLocalMergeTree(viewcell);
-  
-  return pErrorPixels;
+
+			mUseFalseColors = false;
+			glPushAttrib(GL_CURRENT_BIT);
+			glColor3f(0,1,0);
+			glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
+			SetupCamera();
+			glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+			// Render PVS
+			ObjectPvsIterator pit = viewcell->GetPvs().GetIterator();
+
+			while (pit.HasMoreEntries())
+			{		
+				const ObjectPvsEntry &entry = pit.Next();
+				Intersectable *obj = entry.mObject;
+
+				RenderIntersectable(obj);
+			}
+
+			im = toImage();
+			sprintf(filename, "error-frame-%04d-%0.5f-pvs.png", mFrame, pErrorPixels);
+			str = mSnapPrefix + filename;
+			qstr = str.c_str();
+			im.save(qstr, "PNG");
+			glPopAttrib();
+		}
+		glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
+	}
+
+	if (viewcell && mViewCellsManager->GetMaxFilterSize() > 0)
+		mViewCellsManager->DeleteLocalMergeTree(viewcell);
+
+	return pErrorPixels;
 }
 
@@ -512,8 +519,8 @@
 
 void QtGlRendererBuffer::SampleViewpointContributions(Intersectable *sourceObject,
-													const Vector3 viewPoint,
-													Beam &beam,
-													const int samples,
-                                                    BeamSampleStatistics &stat)
+													  const Vector3 viewPoint,
+													  Beam &beam,
+													  const int samples,
+													  BeamSampleStatistics &stat)
 {
     // 1. setup the view port to match the desired samples
@@ -864,5 +871,5 @@
 
 int QtGlRendererBuffer::ComputePvs(ObjectContainer &objects, 
-								 ObjectContainer &pvs) const
+								   ObjectContainer &pvs) const
 {
 	int pvsSize = 0;
@@ -933,47 +940,55 @@
 	viewcell = mViewCellsManager->GetViewCell(mViewPoint, true);
   } else {
-	//  mViewCellsManager->SetMaxFilterSize(1);
-	mViewCellsManager->GetPrVS(mViewPoint, prvs, mViewCellsManager->GetFilterWidth());
-	viewcell = prvs.mViewCell;
+	  //  mViewCellsManager->SetMaxFilterSize(1);
+	  mViewCellsManager->GetPrVS(mViewPoint, prvs, mViewCellsManager->GetFilterWidth());
+	  viewcell = prvs.mViewCell;
   }
-  
-  if (viewcell) {
-	// copy the pvs so that it can be filtered...
-	ObjectPvs pvs = viewcell->GetPvs();
-
-	if (mUseSpatialFilter) {
-	  mViewCellsManager->ApplySpatialFilter(mKdTree,
-											mSpatialFilterSize*
-											Magnitude(mViewCellsManager->GetViewSpaceBox().Size()),
-											pvs);
-	}
-	
-	
-	// read back the texture
-	ObjectPvsMap::const_iterator it = pvs.mEntries.begin();
-
-	mPvsSize = pvs.mEntries.size();
-	  
-	for (; it != pvs.mEntries.end(); ++ it) {
-	  Intersectable *object = (*it).first;
-	  float visibility = log10((*it).second.mSumPdf + 1)/5.0f;
-	  glColor3f(visibility, 0.0f, 0.0f);
-	  mUseForcedColors = true;
-	  RenderIntersectable(object);
-	  mUseForcedColors = false;
-	}
-
-	if (mRenderFilter) {
-	  mWireFrame = true;
-	  RenderIntersectable(viewcell);
-	  mWireFrame = false;
-	}
-	
-	if (mUseFilter)
-	  mViewCellsManager->DeleteLocalMergeTree(viewcell);
-  } else {
-	ObjectContainer::const_iterator oi = mObjects.begin();
-	for (; oi != mObjects.end(); oi++)
-	  RenderIntersectable(*oi);
+
+  if (viewcell) 
+  {
+	  // copy the pvs so that it can be filtered...
+	  ObjectPvs pvs = viewcell->GetPvs();
+
+	  if (mUseSpatialFilter) {
+		  mViewCellsManager->ApplySpatialFilter(mKdTree,
+			  mSpatialFilterSize*
+			  Magnitude(mViewCellsManager->GetViewSpaceBox().Size()),
+			  pvs);
+	  }
+
+	  // read back the texture
+	  mPvsSize = pvs.GetSize();
+
+	  ObjectPvsIterator pit = pvs.GetIterator();
+
+	  while (pit.HasMoreEntries())
+	  {		
+		  const ObjectPvsEntry &entry = pit.Next();
+		  Intersectable *obj = entry.mObject;
+
+		  float visibility = log10(entry.mData.mSumPdf + 1) / 5.0f;
+		  glColor3f(visibility, 0.0f, 0.0f);
+		  mUseForcedColors = true;
+		  RenderIntersectable(obj);
+		  mUseForcedColors = false;
+	  }
+
+	  if (mRenderFilter) 
+	  {
+		  mWireFrame = true;
+		  RenderIntersectable(viewcell);
+		  mWireFrame = false;
+	  }
+
+	  if (mUseFilter)
+	  {
+		  mViewCellsManager->DeleteLocalMergeTree(viewcell);
+	  }
+  } 
+  else 
+  {
+	  ObjectContainer::const_iterator oi = mObjects.begin();
+	  for (; oi != mObjects.end(); oi++)
+		  RenderIntersectable(*oi);
   }
 }
@@ -1313,11 +1328,13 @@
   QString s;
   int vc = 0;
+  
   if (mViewCellsManager)
-	vc = mViewCellsManager->GetViewCells().size();
+	  vc = (int)mViewCellsManager->GetViewCells().size();
+
   int filter = 0;
   if (mViewCellsManager)
 	filter = mViewCellsManager->GetMaxFilterSize();
 
-  s.sprintf("frame:%04d viewpoint:(%4.1f,%4.1f,%4.1f) dir:(%4.1f,%4.1f,%4.1f) viewcells:%04d filter:%04d pvs:%04d error:%5.5f\%",
+  s.sprintf("frame:%04d viewpoint:(%4.1f,%4.1f,%4.1f) dir:(%4.1f,%4.1f,%4.1f) viewcells:%04d filter:%04d pvs:%04d error:%5.5f %",
 			mFrame,
 			mViewPoint.x,
@@ -1483,53 +1500,57 @@
 QtGlRendererWidget::RenderViewCells()
 {
-  mUseFalseColors = true;
-
-  SetupCamera();
-  glEnable(GL_CULL_FACE);
-  //glDisable(GL_CULL_FACE);
-  glCullFace(GL_FRONT);
-  double eq[4];
-  eq[0] = mSceneCutPlane.mNormal.x;
-  eq[1] = mSceneCutPlane.mNormal.y;
-  eq[2] = mSceneCutPlane.mNormal.z;
-  eq[3] = mSceneCutPlane.mD;
-
-  if (mCutViewCells) {
-	glClipPlane(GL_CLIP_PLANE0, eq);
-	glEnable(GL_CLIP_PLANE0);
-  }
-  
-  int i;
-  ViewCellContainer &viewcells = mViewCellsManager->GetViewCells();
-  int maxPvs = -1;
-  for (i=0; i < viewcells.size(); i++) 
-  {
-	ViewCell *vc = viewcells[i];
-	const int p = vc->GetPvs().CountObjectsInPvs();
-	if (p > maxPvs)
-	  maxPvs = p;
-  }
-
-
-  for (i=0; i < viewcells.size(); i++) {
-	ViewCell *vc = viewcells[i];
-	//	Mesh *m = vc->GetMesh();
-
-
-	RgbColor c;
-
-	if (!mShowPvsSizes) 
-	  c = vc->GetColor();
-	else {
-	  const float importance = (float)vc->GetPvs().CountObjectsInPvs() / (float)maxPvs;
-	  c = RgbColor(importance, 1.0f - importance, 0.0f);
-	}
-	glColor3f(c.r, c.g, c.b);
-	
-	RenderViewCell(vc);
-  }
-
-  glDisable(GL_CLIP_PLANE0);
-
+	mUseFalseColors = true;
+
+	SetupCamera();
+	glEnable(GL_CULL_FACE);
+	//glDisable(GL_CULL_FACE);
+	glCullFace(GL_FRONT);
+	double eq[4];
+	eq[0] = mSceneCutPlane.mNormal.x;
+	eq[1] = mSceneCutPlane.mNormal.y;
+	eq[2] = mSceneCutPlane.mNormal.z;
+	eq[3] = mSceneCutPlane.mD;
+
+	if (mCutViewCells) 
+	{
+		glClipPlane(GL_CLIP_PLANE0, eq);
+		glEnable(GL_CLIP_PLANE0);
+	}
+
+	//int i;
+	ViewCellContainer &viewCells = mViewCellsManager->GetViewCells();
+	float maxPvs = -1;
+	ViewCellContainer::const_iterator vit, vit_end = viewCells.end();
+
+	for (vit = viewCells.begin(); vit != vit_end; ++ vit)
+	{
+		ViewCell *vc = *vit;
+		const float p = vc->GetPvs().EvalPvsCost();
+		if (p > maxPvs)
+			maxPvs = p;
+	}
+
+	for (vit = viewCells.begin(); vit != vit_end; ++ vit) 
+	{
+		ViewCell *vc = *vit;
+
+		RgbColor c;
+
+		if (!mShowPvsSizes) 
+		{
+			c = vc->GetColor();
+		}
+		else 
+		{
+			const float importance = (float)vc->GetPvs().EvalPvsCost() / (float)maxPvs;
+			c = RgbColor(importance, 1.0f - importance, 0.0f);
+		}
+
+		glColor3f(c.r, c.g, c.b);
+
+		RenderViewCell(vc);
+	}
+
+	glDisable(GL_CLIP_PLANE0);
 }
 
Index: GTP/trunk/Lib/Vis/Preprocessing/src/QtGlRenderer/QtGlRenderer.vcproj
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/QtGlRenderer/QtGlRenderer.vcproj	(revision 1520)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/QtGlRenderer/QtGlRenderer.vcproj	(revision 1925)
@@ -90,8 +90,8 @@
 			<Tool
 				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"
+				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 RTScene.lib RTWorld.lib cgGL.lib"
 				OutputFile="$(OutDir)/QtGlRenderer.dll"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories="&quot;$(QTDIR)\lib&quot;;..\..\..\..\..\..\..\NonGTP\Zlib\lib;&quot;$(CG_LIB_PATH)&quot;;..\..\src\GL;..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;&quot;..\..\lib\$(ConfigurationName)&quot;"
+				AdditionalLibraryDirectories="&quot;$(QTDIR)\lib&quot;;..\..\..\..\..\..\..\NonGTP\Zlib\lib;&quot;$(CG_LIB_PATH)&quot;;..\..\src\GL;..\..\..\..\..\..\..\NonGTP\Xerces\xercesc\lib;&quot;..\..\lib\$(ConfigurationName)&quot;;..\..\MultiLevelRayTracing\RTScene\Release;..\..\MultiLevelRayTracing\RTWorld\Release"
 				GenerateDebugInformation="FALSE"
 				SubSystem="2"
Index: GTP/trunk/Lib/Vis/Preprocessing/src/QtGlRenderer/QtGlRenderer.h
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/QtGlRenderer/QtGlRenderer.h	(revision 1252)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/QtGlRenderer/QtGlRenderer.h	(revision 1925)
@@ -4,6 +4,4 @@
 #include <QtOpenGL>
 #include <QWaitCondition>
-
-//#include <QGLPixelBuffer>
 
 #include "Vector3.h"
@@ -36,13 +34,13 @@
 
 
-class __declspec(dllexport) QtGlRendererBuffer : public QObject, public QGLPixelBuffer, public GlRendererBuffer
+class __declspec(dllexport) QtGlRendererBuffer: public QObject, public QGLPixelBuffer, public GlRendererBuffer
 {
 	Q_OBJECT
 public:
 	QtGlRendererBuffer(const int w,
-		const int h,
-		SceneGraph *sceneGraph,
-		ViewCellsManager *viewcells,
-		KdTree *tree);
+					   const int h,
+					   SceneGraph *sceneGraph,
+					   ViewCellsManager *viewcells,
+					   KdTree *tree);
 
 	~QtGlRendererBuffer();
@@ -104,6 +102,4 @@
   */
   void ComputeRays(Intersectable *sourceObj, VssRayContainer &rays);
-
-  int ComputePvs() const;
 
   float
Index: GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp	(revision 1785)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/GlRenderer.cpp	(revision 1925)
@@ -25,6 +25,6 @@
 static bool nvQuerySupport = false;
 
-GLuint frontDepthMap;
-GLuint backDepthMap;
+static GLuint frontDepthMap;
+static GLuint backDepthMap;
 
 const int depthMapSize = 512;
Index: GTP/trunk/Lib/Vis/Preprocessing/src/Pvs.h
===================================================================
--- GTP/trunk/Lib/Vis/Preprocessing/src/Pvs.h	(revision 1877)
+++ GTP/trunk/Lib/Vis/Preprocessing/src/Pvs.h	(revision 1925)
@@ -184,7 +184,8 @@
 	int Compress() {return 0;}
 	int GetSize() const {return (int)mEntries.size();}
-  bool Empty() const {return mEntries.empty();}
-
-  void Reserve(const int n) { mEntries.reserve(n); }
+	bool Empty() const {return mEntries.empty();}
+
+	void Reserve(const int n) { mEntries.reserve(n); }
+
 	/** Normalize the visibility of entries in order to get 
 		comparable results.
@@ -901,5 +902,4 @@
 		return s;
 	}
-
 };
 
