Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/FriendlyCulling.sln
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/FriendlyCulling.sln	(revision 3235)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/FriendlyCulling.sln	(revision 3237)
@@ -12,9 +12,4 @@
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VboFormatConverter", "VboFormatConverter.vcproj", "{93A522E1-76F0-4D46-9C97-30DC2DDB531B}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "IrradianceMapping", "IrradianceMapping.vcproj", "{91680C49-A358-48AE-A02C-66CB884B7D7F}"
-	ProjectSection(ProjectDependencies) = postProject
-		{03661866-4093-4B02-B26A-028EA91AF023} = {03661866-4093-4B02-B26A-028EA91AF023}
-	EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VisibilitySolutionConverter", "VisibilitySolutionConverter.vcproj", "{A07AEF7C-5A28-4881-AE56-F9C5FFA3FEC4}"
@@ -42,8 +37,4 @@
 		{93A522E1-76F0-4D46-9C97-30DC2DDB531B}.Release|Win32.ActiveCfg = Release|Win32
 		{93A522E1-76F0-4D46-9C97-30DC2DDB531B}.Release|Win32.Build.0 = Release|Win32
-		{91680C49-A358-48AE-A02C-66CB884B7D7F}.Debug|Win32.ActiveCfg = Debug|Win32
-		{91680C49-A358-48AE-A02C-66CB884B7D7F}.Debug|Win32.Build.0 = Debug|Win32
-		{91680C49-A358-48AE-A02C-66CB884B7D7F}.Release|Win32.ActiveCfg = Release|Win32
-		{91680C49-A358-48AE-A02C-66CB884B7D7F}.Release|Win32.Build.0 = Release|Win32
 		{A07AEF7C-5A28-4881-AE56-F9C5FFA3FEC4}.Debug|Win32.ActiveCfg = Debug|Win32
 		{A07AEF7C-5A28-4881-AE56-F9C5FFA3FEC4}.Debug|Win32.Build.0 = Debug|Win32
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ResourceManager.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ResourceManager.cpp	(revision 3236)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ResourceManager.cpp	(revision 3237)
@@ -196,5 +196,5 @@
 
 
-void ResourceManager::LoadTextures(igzstream &str)
+int ResourceManager::LoadTextures(igzstream &str)
 {
 	int numTextures;
@@ -228,9 +228,9 @@
 	}
 
-	cout << "loaded " << (int)mTextureTable.size() << " textures" << endl;
-}
-
-// mtt todo_ split that up
-void ResourceManager::LoadShapes(igzstream &str)
+	return numTextures;
+}
+
+// todo: split up geometry and materials!!
+int ResourceManager::LoadShapes(igzstream &str)
 {
 	int numShapes;
@@ -249,5 +249,5 @@
 	}
 
-	cout << "loaded " << (int)mGeometryTable.size() << " shapes" << endl;
+	return numShapes;
 }
 
@@ -393,6 +393,6 @@
 
 
-void ResourceManager::LoadSceneEntities(igzstream &str, 
-										SceneEntityContainer &entities)
+int ResourceManager::LoadSceneEntities(igzstream &str, 
+									   SceneEntityContainer &entities)
 {
 	int entityCount;
@@ -411,37 +411,44 @@
 	}
 
-	cout << "loaded " << entityCount << " scene entities" << endl;
-}
-
-
-bool ResourceManager::Load(const std::string &filename,
-						   SceneEntityContainer &entities)
+	return entityCount;
+}
+
+
+int ResourceManager::Load(const std::string &filename,
+						  SceneEntityContainer &entities)
 {
 	igzstream istr(filename.c_str());
 	
 	if (!istr.is_open())
-		return false;
+		return 0;
 
 	cout << "loading textures" << endl;
 	
 	// load the texture table
-	LoadTextures(istr);
+	int numTextures = LoadTextures(istr);
+
+	cout << "loaded " << numTextures << " textures" << endl;
 
 	cout << "loading shapes (geometry + materials)" << endl;
 
 	// load the shapees
-	LoadShapes(istr);
+	int numShapes = LoadShapes(istr);
+
+	cout << "loaded " << (int)mGeometryTable.size() << " shapes" << endl;
 
 	cout << "loading scene entites" << endl;
-	LoadSceneEntities(istr, entities);
-	
+	
+	int numEntities = LoadSceneEntities(istr, entities);
+	
+	cout << "loaded " << numEntities << " scene entities" << endl;
+
 	cout << "bin loading finished" << endl;
 
-	// clean up
+	// clean up temporary tables
 	mTextureTable.clear();
 	mGeometryTable.clear();
 	mMaterialTable.clear();
 
-	return true;
+	return numEntities;
 }
 
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ResourceManager.h
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ResourceManager.h	(revision 3226)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ResourceManager.h	(revision 3237)
@@ -32,7 +32,9 @@
 public:
 
-	/** Loads a model
+	/** Loads a scene containing of several scene entities. the entities are added to
+		the previously loaded entities. Returns the number of entities in the
+		scene.
 	*/
-	bool Load(const std::string &filename, SceneEntityContainer &geometry);
+	int Load(const std::string &filename, SceneEntityContainer &geometry);
 	/** Returns number of scene entities loaded with this manager.
 	*/
@@ -60,4 +62,6 @@
 	Material *CreateMaterial();
 
+	/////////////////
+
 	/// giant hack: set this to true if the geometry to load has tangent data for normal mapping
 	bool mUseNormalMapping;
@@ -75,7 +79,7 @@
 	~ResourceManager();
 
-	void LoadTextures(igzstream &str);
-	void LoadShapes(igzstream &str);
-	void LoadSceneEntities(igzstream &str, SceneEntityContainer &entities);
+	int LoadTextures(igzstream &str);
+	int LoadShapes(igzstream &str);
+	int LoadSceneEntities(igzstream &str, SceneEntityContainer &entities);
 
 	SceneEntity *LoadSceneEntity(igzstream &str);
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp	(revision 3236)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp	(revision 3237)
@@ -335,5 +335,5 @@
 void PrepareRenderQueue();
 /// loads the specified model
-void LoadModel(const string &model, SceneEntityContainer &entities);
+int LoadModel(const string &model, SceneEntityContainer &entities);
 
 inline float KeyRotationAngle() { return keyRotation * elapsedTime * 1e-3f; }
@@ -578,6 +578,8 @@
 
 
-	LoadModel("vienna_full_hp.dem", dynamicObjects);
-	dynamicObjects.back()->GetTransform()->SetMatrix(transl);
+	int cityEntities = LoadModel("vienna_full_hp.dem", dynamicObjects);
+	
+	for (int i = (int)dynamicObjects.size() - cityEntities; i < (int)dynamicObjects.size(); ++ i)
+		dynamicObjects[i]->GetTransform()->SetMatrix(transl);
 
 
@@ -2408,10 +2410,13 @@
 
 
-void LoadModel(const string &model, SceneEntityContainer &entities)
+int LoadModel(const string &model, SceneEntityContainer &entities)
 {
 	const string filename = string(model_path + model);
 
+	int numEntities = 0;
+
 	cout << "\nloading model " << filename << endl;
-	if (resourceManager->Load(filename, entities))
+
+	if (numEntities = resourceManager->Load(filename, entities))
 	{
 		cout << "model " << filename << " successfully loaded" << endl;
@@ -2424,4 +2429,6 @@
 		exit(0);
 	}
+
+	return numEntities;
 }
 
