Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderTraverser.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderTraverser.cpp	(revision 3251)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderTraverser.cpp	(revision 3258)
@@ -5,4 +5,5 @@
 #include "RenderState.h"
 #include "Geometry.h"
+#include "RenderQueue.h"
 #include "Timer/PerfTimer.h"
 
@@ -292,5 +293,5 @@
 
 
-bool RenderTraverser::IsNodeVisible(BvhNode *node, int maxSize)
+bool RenderTraverser::IsNodeGeometryVisible(BvhNode *node, int maxSize)
 {
 	// no invisible objects
@@ -300,5 +301,5 @@
 	SceneEntity **entities = mBvh->GetGeometry(node, geometrySize);
 
-	if (geometrySize > maxSize) return true;
+	if ((maxSize != -1) && (geometrySize > maxSize)) return true;
 
 	for (int i = 0; i < geometrySize; ++ i)
@@ -311,3 +312,40 @@
 
 
-}
+void RenderTraverser::SetCamera(Camera *cam)
+{
+	mCamera = cam;
+}
+
+
+void RenderTraverser::SetRenderQueue(RenderQueue *rq)
+{
+	mRenderQueue = rq;
+}
+
+
+const TraversalStatistics &RenderTraverser::GetStats() const 
+{
+	return mStats; 
+}
+
+
+const SceneEntityContainer &RenderTraverser::GetVisibleObjects() const 
+{
+	return mVisibleObjects; 
+}
+
+
+float RenderTraverser::GetMaxVisibleDistance() const 
+{ 
+	return mMaxVisibleDistance; 
+}
+
+
+Camera *RenderTraverser::GetCamera() const
+{
+	return mCamera; 
+}
+
+
+
+}
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/VisibilitySolutionLoader.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/VisibilitySolutionLoader.cpp	(revision 3257)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/VisibilitySolutionLoader.cpp	(revision 3258)
@@ -155,6 +155,4 @@
 			entities = bvh->GetGeometry(node, geometrySize);
 
-			//if (node->IsLeaf() && (geometrySize != 1))
-			//if (geometrySize != 1) cout << "Error!! " << geometrySize << endl;
 			for (int k = 0; k < geometrySize; ++ k)
 			{
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/PvsCollectionRenderer.h
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/PvsCollectionRenderer.h	(revision 3258)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/PvsCollectionRenderer.h	(revision 3258)
@@ -0,0 +1,65 @@
+#ifndef __PVSCOLLECTIONRENDERER_H
+#define __PVSCOLLECTIONRENDERER_H
+
+#include "RenderTraverser.h"
+
+namespace CHCDemoEngine
+{
+
+struct ViewCell;
+
+/** Preprocessing as well as online culling using hardware occlusion
+    queries have certain pros and cons. This method allows 
+	us to combine those two paradigms for the maximum performance. 
+	In particular, we propose following
+	algorithm, which gets rid of most of the shortcomings of either
+	approach. I.e., it is a strictly conservative approach that requires
+	only very short preprocessing time in the range of some seconds, while
+	inducing practically no overhead during runtime.
+
+	First we compute a very coarse global visibilitiy solution using our
+	sampling based preprocessor, which will be already sufficient to drive the
+	online alorithm. During walkthrough, we use occlusion queries to test
+	potentially invisible objects in a very efficient way, eliminating most of
+	the overhead of the query testing. The method assumes that previously
+	invisible objects are not part of a PVS, and as long as the assumption
+	hold's the algorithm has very low overhead. The method is conservative, and
+	converges over time in the sense that newly found visible objects are added
+	to the PVS. As the PVSs become more and more exact, the render time
+	overhead reduces to a minimum.
+*/
+class PvsCollectionRenderer: public RenderTraverser
+{
+public:
+	/** Default constructor.
+	*/
+	PvsCollectionRenderer();
+	
+	virtual ~PvsCollectionRenderer();
+
+	void SetViewCell(ViewCell *vc) { mViewCell = vc; }
+
+	virtual int GetType() const { return CULL_COLLECTOR; }
+
+protected:
+
+	/** Traverses and renders the scene with the specified method
+	*/
+	virtual void Traverse();
+
+	void AddGeometryToPIS(BvhNode *node);
+
+
+	//////////////////////
+
+	ViewCell *mViewCell;
+	/// the potentially invisible set of objects
+	BvhNodeContainer mPIS;
+};
+
+
+}
+
+
+
+#endif // RENDERTRAVERSER_H
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/OcclusionQuery.h
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/OcclusionQuery.h	(revision 2782)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/OcclusionQuery.h	(revision 3258)
@@ -24,19 +24,26 @@
 
 	virtual ~OcclusionQuery();
-
+	/** Returns true if the query result is available.
+	*/
 	bool ResultAvailable() const;
-	
+	/** Returns number of visible pixels.
+	*/
 	unsigned int GetQueryResult() const;
-	
+	/** Starts the query. Everything drawn inbetween start and end is
+		queried.
+	*/
 	void BeginQuery() const;
-	
+	/** Ends the query.
+	*/
 	void EndQuery() const;
-	
+	/** Returns id of this query.
+	*/
 	unsigned int GetQueryId() const;
 	/** Returns the first node of the multiquery
 	*/
 	inline BvhNode *GetFrontNode() const { return mNodes[0]; }
+	/** Returns nodes by reference
+	*/
 	inline const BvhNodeContainer &GetNodes() const { return mNodes; }
-
 	/** Reset the list of nodes associated with this query.
 	*/
@@ -47,9 +54,12 @@
 	/** Returns the size of the multiquery.
 	*/
-	inline int GetSize() const { return (int)mNodes.size();}
-	
+	inline int GetSize() const { return (int)mNodes.size(); }
+
+	inline bool IsEmpty() const { return GetSize() == 0; }
+
 
 protected:
-
+	/** Constructor taking an already allocated query id.
+	*/
 	OcclusionQuery(unsigned int id): mQueryId(id) { }
 
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/PvsCollectionRenderer.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/PvsCollectionRenderer.cpp	(revision 3258)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/PvsCollectionRenderer.cpp	(revision 3258)
@@ -0,0 +1,152 @@
+#include "PvsCollectionRenderer.h"
+#include "ViewCellsTree.h"
+
+
+using namespace std;
+
+
+namespace CHCDemoEngine
+{
+
+
+PvsCollectionRenderer::PvsCollectionRenderer(): 
+RenderTraverser(), mViewCell(NULL)
+{
+}
+
+
+PvsCollectionRenderer::~PvsCollectionRenderer()
+{
+}
+
+
+void PvsCollectionRenderer::Traverse()
+{
+	////////////
+	//-- part1: do frustum culling + pvs
+
+	while (!mDistanceQueue.empty())
+	{
+		BvhNode *node = mDistanceQueue.top();
+		mDistanceQueue.pop();
+	
+		if (mBvh->IsWithinViewFrustum(node))
+		{
+			// for leaves: check if the geometry is already in PVS
+			if (!node->IsVirtualLeaf()  || IsNodeGeometryVisible(node, -1))
+			{
+				TraverseNode(node);
+			}
+			else
+			{
+				mPIS.push_back(node);
+			}
+		}
+		else
+		{
+			++ mStats.mNumFrustumCulledNodes;
+		}
+	}
+
+	////////////
+	//-- part2: test the potentially invisible nodes
+
+	static QueryQueue queries;
+
+	BvhNodeContainer::const_iterator it, it_end = mPIS.end();
+
+	OcclusionQuery *query = mQueryHandler.RequestQuery();
+	
+	int querySize = 50;
+
+	for (it = mPIS.begin(); it != it_end; ++ it)
+	{
+		query->AddNode(*it);
+
+		if (query->GetSize() == querySize)
+		{
+			// issue multiquery
+			IssueOcclusionQuery(*query);
+			queries.push(query);
+
+			// get next query
+			query = mQueryHandler.RequestQuery();
+			query->Reset();
+		}
+	}
+
+	// query the rest of the nodes
+	if (!query->IsEmpty())
+	{
+		IssueOcclusionQuery(*query);
+		queries.push(query);
+	}
+
+	
+	static BvhNodeContainer probablyVisibleNodes;
+	probablyVisibleNodes.clear();
+	
+	
+	// get query results: collect probably visible nodes
+	while (!queries.empty())
+	{
+		OcclusionQuery *q = queries.front();
+		queries.pop();
+	
+		const int visiblePixels = q->GetQueryResult();
+
+		if (visiblePixels > 0)
+		{
+			BvhNodeContainer::const_iterator bit, bit_end = q->GetNodes().end();
+
+			for (bit= q->GetNodes().begin(); bit != bit_end; ++ bit)
+			{
+				// query failed => render and add to probably visible nodes
+				RenderNode(*bit);
+				probablyVisibleNodes.push_back(*bit);
+			}
+		}
+	}
+
+
+	//////////////
+	//-- part4: test probably visible nodes individually, update pvs of current view cell
+
+	return;
+	//if (!mViewCell) return;
+	
+	// query all nodes individually
+	BvhNodeContainer::const_iterator bit, bit_end = probablyVisibleNodes.end();
+
+	for (bit = probablyVisibleNodes.begin(); bit != bit_end; ++ bit)
+	{
+		BvhNode *n = *bit;
+		queries.push(IssueOcclusionQuery(n));
+	}
+
+	// get query results: if visible, add node to pvs
+	while (!queries.empty())
+	{
+		OcclusionQuery *q = queries.front();
+		queries.pop();
+	
+		const int visiblePixels = q->GetQueryResult();
+
+		if (visiblePixels > 0)
+		{
+			// add node to pvs
+			int geometrySize;
+			SceneEntity **entities;
+			entities = mBvh->GetGeometry(q->GetFrontNode(), geometrySize);
+
+			for (int i = 0; i < geometrySize; ++ i)
+			{
+				mViewCell->mPvs.AddEntry(entities[i]);
+			}
+		}
+	}
+}
+
+
+
+}
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ShadowMapping.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ShadowMapping.cpp	(revision 3233)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ShadowMapping.cpp	(revision 3258)
@@ -7,4 +7,5 @@
 #include "Polyhedron.h"
 #include "ResourceManager.h"
+#include "Camera.h"
 
 #include <IL/il.h>
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp	(revision 3257)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp	(revision 3258)
@@ -60,4 +60,5 @@
 #include "VisibilitySolutionLoader.h"
 #include "ViewCellsTree.h"
+#include "PvsCollectionRenderer.h"
 
 
@@ -894,5 +895,7 @@
 		tr = new CHCPlusPlusTraverser();
 		break;
-	
+	case RenderTraverser::CULL_COLLECTOR:
+		tr = new PvsCollectionRenderer();
+		break;
 	default:
 		tr = new FrustumCullingTraverser();
@@ -1278,4 +1281,7 @@
 	else
 	{
+		if (traverser->GetType() == RenderTraverser::CULL_COLLECTOR)
+			((PvsCollectionRenderer *)traverser)->SetViewCell(usePvs ? viewCell : NULL);
+
 		// actually render the scene geometry using the specified algorithm
 		traverser->RenderScene();
@@ -1423,4 +1429,5 @@
 	case 32: // space
 		renderMode = (renderMode + 1) % RenderTraverser::NUM_TRAVERSAL_TYPES;
+		//renderMode = (renderMode + 1) % 4;
 
 		DEL_PTR(traverser);
@@ -2312,5 +2319,11 @@
 
 		glColor3f(1.0f, 1.0f, 1.0f);
-		static char *alg_str[] = {"Frustum Cull", "Stop and Wait", "CHC", "CHC ++"};
+		static char *alg_str[] = {
+			"Frustum Cull"
+			, "Stop and Wait"
+			, "CHC"
+			, "CHC ++"
+			, "Collector"
+		};
 		
 		if (!showAlgorithmTime)
@@ -2393,4 +2406,5 @@
 		renderQueue->Enqueue(*sit);
 	}
+
 	/// now render out everything in one giant pass
 	renderQueue->Apply();
@@ -2407,5 +2421,7 @@
 {
 	if (!sceneQuery)
+	{
 		sceneQuery = new SceneQuery(bvh->GetBox(), traverser, &renderState);
+	}
 
 	return sceneQuery;
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/CHCPlusPlusTraverser.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/CHCPlusPlusTraverser.cpp	(revision 3251)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/CHCPlusPlusTraverser.cpp	(revision 3258)
@@ -119,5 +119,5 @@
 			mDistanceQueue.pop();
 	
-			if (1 && !IsNodeVisible(node, 10))
+			if (1 && !IsNodeGeometryVisible(node, 10))
 			{
 				node->SetVisible(false);
@@ -261,5 +261,5 @@
 			newPBatch = 0;
 		else
-		newPBatch *= mVisibilityPredictor.GetProbability(node);
+			newPBatch *= mVisibilityPredictor.GetProbability(node);
 
 		if (query->GetNodes().empty())
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/FrustumCullingTraverser.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/FrustumCullingTraverser.cpp	(revision 3251)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/FrustumCullingTraverser.cpp	(revision 3258)
@@ -1,4 +1,3 @@
 #include "FrustumCullingTraverser.h"
-#include "SceneEntity.h"
 
 
@@ -18,5 +17,5 @@
 		mDistanceQueue.pop();
 	
-		if (1 && !IsNodeVisible(node, 10))
+		if (1 && !IsNodeGeometryVisible(node, 10))
 		{
 			node->SetVisible(false);
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderTraverser.h
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderTraverser.h	(revision 3251)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderTraverser.h	(revision 3258)
@@ -2,11 +2,9 @@
 #define __RENDERTRAVERSER_H
 
-#include <queue>
+
 #include "Bvh.h"
 #include "OcclusionQuery.h"
-#include "Camera.h"
-#include "RenderQueue.h"
-#include "Timer/PerfTimer.h"
-
+//#include "Timer/PerfTimer.h"
+#include <queue>
 
 
@@ -14,7 +12,7 @@
 {
 
+
 class Camera;
-class Matrix4x4;
-
+class RenderQueue;
 
 
@@ -53,13 +51,17 @@
 
 	/// types of traversers
-	enum {CULL_FRUSTUM, STOP_AND_WAIT, CHC, CHCPLUSPLUS, NUM_TRAVERSAL_TYPES};
+	enum {CULL_FRUSTUM,
+		  STOP_AND_WAIT, 
+		  CHC, CHCPLUSPLUS, 
+		  CULL_COLLECTOR,
+		  NUM_TRAVERSAL_TYPES};
 
 	/** Default constructor.
 	*/
 	RenderTraverser();
-	/** Virtual constructor, has to be redefined in subclasses
+	/** Virtual constructor, has to be redefined in subclasses.
 	*/
 	virtual ~RenderTraverser();
-	/** Abstract method that traverses and renders the scene
+	/** Maim method that traverses and renders the scene.
 	*/
 	void RenderScene();
@@ -78,20 +80,22 @@
 	/** Sets the camera.
 	*/
-	void SetCamera(Camera *cam) { mCamera = cam;}
+	void SetCamera(Camera *cam);
 	/** Sets the render queue.
 	*/
-	void SetRenderQueue(RenderQueue *rq) {mRenderQueue =rq;}
-	/** Sets the current render state
+	void SetRenderQueue(RenderQueue *rq);
+	/** Sets the current render state.
 	*/
 	void SetRenderState(RenderState *state);
 	/** The traversal statistics
 	*/
-	const TraversalStatistics &GetStats() const { return mStats; }
+	const TraversalStatistics &GetStats() const;
 	/** The current frame id
 	*/
-	int GetCurrentFrameId() const { return mFrameId; }
+	inline int GetCurrentFrameId() const;
 	
+
+
 	//////////////////
-	//-- options for the different rendering algorithms
+	//-- methods that concern one or more of the implemented rendering algorithms
 
 	/** If a render queue should be used to batch up and sort scene entities before
@@ -107,6 +111,8 @@
 	void SetVisibilityThreshold(int threshold);
 
+
 	///////////////////
 	//-- CHC / CHC ++ related options
+	//-- note: could be implemented more cleanly in a CoherentOcclusionCullingTraverser parent class!
 
 	/** CHC optimization to query the geometry itself instead of the bounding box.
@@ -131,13 +137,13 @@
 	    (only if StoreVisibleObjects is set)
 	*/
-	const SceneEntityContainer &GetVisibleObjects() const { return mVisibleObjects; }
+	const SceneEntityContainer &GetVisibleObjects() const;
 	/** Returns the current camera.
 	*/
-	Camera *GetCamera() const { return mCamera; }
+	Camera *GetCamera() const;
 	/** Returns the maximal visible distance encountered in the scene. 
 	    Useful for e.g., shadow map focussing
 	*/
-	float GetMaxVisibleDistance() const { return mMaxVisibleDistance; }
-	/** Render also dynamic objects.
+	float GetMaxVisibleDistance() const;
+	/** Render objects declared as dynamic (non-static)
 	*/
 	void SetRenderDynamicObjects(bool dynamic);
@@ -168,6 +174,9 @@
 	*/
 	void ApplyRenderQueue();
-
-	bool IsNodeVisible(BvhNode *node, int maxSize);
+	/** Returns true if at least one of the objects in this node are 
+		marked as visible. maxSize describes the maximum sized node 
+		(in # of objects) that is tested. if maxSize is -1, all nodes are tested.
+	*/
+	bool IsNodeGeometryVisible(BvhNode *node, int maxSize);
 
 
@@ -189,7 +198,6 @@
 	/// the statisitcs
 	TraversalStatistics mStats;
-	
+	/// the render queue
 	RenderQueue *mRenderQueue;
-
 	/// the objects found visible in current frame
 	SceneEntityContainer mVisibleObjects;
@@ -197,4 +205,5 @@
 	float mMaxVisibleDistance;
 
+
 	/////////////////
 	//-- algorithm parameters
@@ -222,7 +231,13 @@
 
 
+inline int RenderTraverser::GetCurrentFrameId() const 
+{ 
+	return mFrameId; 
 }
 
 
+}
+
+
 
 #endif // RENDERTRAVERSER_H
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/MainApp.vcproj
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/MainApp.vcproj	(revision 3246)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/MainApp.vcproj	(revision 3258)
@@ -66,6 +66,8 @@
 				LinkIncremental="2"
 				AdditionalLibraryDirectories="&quot;lib/$(ConfigurationName)&quot;;libs;&quot;$(CG_LIB_PATH)&quot;;libs/GL;libs/Devil/lib;libs/Zlib/lib"
+				IgnoreDefaultLibraryNames="LIBCMT"
 				GenerateDebugInformation="true"
 				SubSystem="1"
+				LargeAddressAware="2"
 				TargetMachine="1"
 			/>
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/FriendlyCulling.vcproj
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/FriendlyCulling.vcproj	(revision 3243)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/FriendlyCulling.vcproj	(revision 3258)
@@ -335,4 +335,8 @@
 				</File>
 				<File
+					RelativePath=".\src\PvsCollectionRenderer.h"
+					>
+				</File>
+				<File
 					RelativePath=".\src\RenderTraverser.h"
 					>
@@ -411,4 +415,8 @@
 						/>
 					</FileConfiguration>
+				</File>
+				<File
+					RelativePath=".\src\PvsCollectionRenderer.cpp"
+					>
 				</File>
 				<File
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter.vcproj
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter.vcproj	(revision 3235)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter.vcproj	(revision 3258)
@@ -18,6 +18,6 @@
 		<Configuration
 			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
+			OutputDirectory="$(SolutionDir)\$(ProjectName)\$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)\$(ProjectName)"
 			ConfigurationType="1"
 			CharacterSet="1"
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/default.env
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/default.env	(revision 3257)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/default.env	(revision 3258)
@@ -115,10 +115,10 @@
 ## powerplant options
 
-filename=PowerPlantM
+#filename=PowerPlantM
 
-keyForwardMotion=500.0f
-mouseMotion=3.0f
-visibilitySolution=power-plant-2c-xx-1000b-pgv2
-camPosition=-1320.57 -6306.34 3603
-camDirection=0.292156 0.9556 0.0383878
-viewCellsScaleFactor=0.05f
+#keyForwardMotion=500.0f
+#mouseMotion=3.0f
+#visibilitySolution=power-plant-2c-xx-1000b-pgv2
+#camPosition=-1320.57 -6306.34 3603
+#camDirection=0.292156 0.9556 0.0383878
+#viewCellsScaleFactor=0.05f
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/VisibilitySolutionConverter.vcproj
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/VisibilitySolutionConverter.vcproj	(revision 3248)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/VisibilitySolutionConverter.vcproj	(revision 3258)
@@ -42,5 +42,5 @@
 				AdditionalOptions=" /D &quot;_CRT_SECURE_NO_WARNINGS&quot;"
 				Optimization="0"
-				AdditionalIncludeDirectories="libs\Zlib\include"
+				AdditionalIncludeDirectories="libs\Zlib\include; src"
 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
 				MinimalRebuild="true"
@@ -63,7 +63,7 @@
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="zlib.lib"
+				AdditionalDependencies="zlib.lib DemoEngine.lib"
 				LinkIncremental="2"
-				AdditionalLibraryDirectories="libs\Zlib\lib"
+				AdditionalLibraryDirectories="libs\Zlib\lib; lib\$(ConfigurationName)"
 				IgnoreDefaultLibraryNames="libCMT"
 				GenerateDebugInformation="true"
