Index: trunk/VUT/Ogre/src/OgrePlatformHierarchyInterface.cpp
===================================================================
--- trunk/VUT/Ogre/src/OgrePlatformHierarchyInterface.cpp	(revision 187)
+++ trunk/VUT/Ogre/src/OgrePlatformHierarchyInterface.cpp	(revision 316)
@@ -87,8 +87,8 @@
 	
 	mRenderSystem->_setWorldMatrix(Ogre::Matrix4::IDENTITY);
-	mSceneManager->useRenderableViewProjMode(solidBox);
+	mSceneManager->useRenderableViewProjModeWrapper(solidBox);
 	
 	// set no depth write, no color, no lighting material
-	mSceneManager->setPass(solidBox->getTechnique()->getPass(0));
+	mSceneManager->setPassWrapper(solidBox->getTechnique()->getPass(0)); // HACK! (mySetPass should be setPass)
 	//SetOcclusionPass();
 
Index: trunk/VUT/Ogre/src/OgrePlatformQueryManager.cpp
===================================================================
--- trunk/VUT/Ogre/src/OgrePlatformQueryManager.cpp	(revision 174)
+++ trunk/VUT/Ogre/src/OgrePlatformQueryManager.cpp	(revision 316)
@@ -26,7 +26,7 @@
 //-----------------------------------------------------------------------
 void PlatformQueryManager::ComputeFromPointVisibility(const Vector3 &point,
-			       InfoContainer<GtpVisibility::NodeInfo> *visibleNodes,
-			       InfoContainer<GtpVisibility::MeshInfo> *visibleGeometry,
-				   InfoContainer<GtpVisibility::PatchInfo> *visiblePatches,
+			       GtpVisibility::NodeInfoContainer *visibleNodes,
+			       GtpVisibility::MeshInfoContainer *visibleGeometry,
+				   GtpVisibility::PatchInfoContainer *visiblePatches,
 			       bool relativeVisibility)
 {
@@ -86,7 +86,7 @@
 //-----------------------------------------------------------------------
 void PlatformQueryManager::ComputeCameraVisibility(const Camera &camera,
-			    InfoContainer<GtpVisibility::NodeInfo> *visibleNodes,
-			    InfoContainer<GtpVisibility::MeshInfo> *visibleGeometry,
-				InfoContainer<GtpVisibility::PatchInfo> *visiblePatches,
+			    GtpVisibility::NodeInfoContainer *visibleNodes,
+			    GtpVisibility::MeshInfoContainer *visibleGeometry,
+				GtpVisibility::PatchInfoContainer *visiblePatches,
 			    bool relativeVisibility)
 {
@@ -137,6 +137,6 @@
 //-----------------------------------------------------------------------
 void PlatformQueryManager::CollectItemBufferResults(
-				InfoContainer<GtpVisibility::MeshInfo> *visibleGeometry,
-				InfoContainer<GtpVisibility::PatchInfo> *visiblePatches)
+				GtpVisibility::MeshInfoContainer *visibleGeometry,
+				GtpVisibility::PatchInfoContainer *visiblePatches)
 {
 	int dimx = 0;
@@ -180,6 +180,6 @@
 //-----------------------------------------------------------------------
 void PlatformQueryManager::InitItemBuffer(
-				InfoContainer<GtpVisibility::MeshInfo> *visibleGeometry,
-				InfoContainer<GtpVisibility::PatchInfo> *visiblePatches)
+				GtpVisibility::MeshInfoContainer *visibleGeometry,
+				GtpVisibility::PatchInfoContainer *visiblePatches)
 {
 	if (mWasInitialised)
Index: trunk/VUT/Ogre/src/OgreOcclusionQueriesQueryManager.cpp
===================================================================
--- trunk/VUT/Ogre/src/OgreOcclusionQueriesQueryManager.cpp	(revision 175)
+++ trunk/VUT/Ogre/src/OgreOcclusionQueriesQueryManager.cpp	(revision 316)
@@ -8,38 +8,29 @@
 namespace Ogre {
 
-/**
-   These functions necessary to enable sorting of node / mesh / patch info.
-*/
-//-----------------------------------------------------------------------
-inline bool nodeinfo_eq(const GtpVisibility::NodeInfo &info1, const GtpVisibility::NodeInfo &info2) 
-{ 
-	return info1.GetNode() == info2.GetNode(); 
-}
-//-----------------------------------------------------------------------
-inline bool meshinfo_eq(const GtpVisibility::MeshInfo &info1, const GtpVisibility::MeshInfo &info2) 
-{ 
-	return info1.GetMesh() == info2.GetMesh(); 
-}
-//-----------------------------------------------------------------------
-inline bool patchinfo_eq(const GtpVisibility::PatchInfo &info1, const GtpVisibility::PatchInfo &info2) 
-{ 
-	return info1.GetPatch() == info2.GetPatch(); 
-}
-//-----------------------------------------------------------------------
-inline bool nodeinfo_lower(const GtpVisibility::NodeInfo &info1, const GtpVisibility::NodeInfo &info2) 
-{ 
-	return info1.GetNode() < info2.GetNode(); 
-}
-//-----------------------------------------------------------------------
-inline bool meshinfo_lower(const GtpVisibility::MeshInfo &info1, const GtpVisibility::MeshInfo &info2) 
-{ 
-	return info1.GetMesh() < info2.GetMesh(); 
-}
-//-----------------------------------------------------------------------
-inline bool patchinfo_lower(const GtpVisibility::PatchInfo &info1, const GtpVisibility::PatchInfo &info2) 
-{ 
-	return info1.GetPatch() < info2.GetPatch(); 
-}
-
+//-----------------------------------------------------------------------
+bool nodeinfo_eq(const GtpVisibility::NodeInfo &a, const GtpVisibility::NodeInfo &b)
+{
+	return a.GetSource() == b.GetSource();
+} 
+bool nodeinfo_lt(const GtpVisibility::NodeInfo &a, const GtpVisibility::NodeInfo &b)
+{
+	return a.GetSource() < b.GetSource();
+}
+bool meshinfo_eq(const GtpVisibility::MeshInfo &a, const GtpVisibility::MeshInfo &b)
+{
+	return a.GetSource() == b.GetSource();
+} 
+bool meshinfo_lt(const GtpVisibility::MeshInfo &a, const GtpVisibility::MeshInfo &b)
+{	
+	return a.GetSource() < b.GetSource();
+}
+bool patchinfo_eq(const GtpVisibility::PatchInfo &a, const GtpVisibility::PatchInfo &b)
+{
+	return a.GetSource() == b.GetSource();
+} 
+bool patchinfo_lt(const GtpVisibility::PatchInfo &a, const GtpVisibility::PatchInfo &b)
+{
+	return a.GetSource() < b.GetSource();
+}
 
 //----------------------------------------------------------------------- 
@@ -55,7 +46,7 @@
 //-----------------------------------------------------------------------
 void OcclusionQueriesQueryManager::ComputeCameraVisibility(const Camera &camera,
-			    InfoContainer<GtpVisibility::NodeInfo> *visibleNodes,
-			    InfoContainer<GtpVisibility::MeshInfo> *visibleGeometry,
-				InfoContainer<GtpVisibility::PatchInfo> *visiblePatches,
+			    GtpVisibility::NodeInfoContainer *visibleNodes,
+			    GtpVisibility::MeshInfoContainer *visibleGeometry,
+				GtpVisibility::PatchInfoContainer *visiblePatches,
 			    bool relativeVisibility)
 {
@@ -238,7 +229,7 @@
 //-----------------------------------------------------------------------
 void OcclusionQueriesQueryManager::ComputeFromPointVisibility(const Vector3 &point,
-			       InfoContainer<GtpVisibility::NodeInfo> *visibleNodes,
-			       InfoContainer<GtpVisibility::MeshInfo> *visibleGeometry,
-				   InfoContainer<GtpVisibility::PatchInfo> *visiblePatches,
+			       GtpVisibility::NodeInfoContainer *visibleNodes,
+			       GtpVisibility::MeshInfoContainer *visibleGeometry,
+				   GtpVisibility::PatchInfoContainer *visiblePatches,
 			       bool relativeVisibility)
 {
@@ -265,5 +256,5 @@
 						GtpVisibility::QueryList::iterator &projQueryIt,
 						GtpVisibility::HierarchyNodeList *nodeList,  
-						InfoContainer<GtpVisibility::NodeInfo> *visibleNodes,
+						GtpVisibility::NodeInfoContainer *visibleNodes,
 						bool relativeVisibility)
 {
@@ -299,5 +290,5 @@
 									GtpVisibility::QueryList::iterator &projQueryIt,
 									GtpVisibility::GeometryList *geometryList, 
-									InfoContainer<GtpVisibility::MeshInfo> *visibleGeometry)
+									GtpVisibility::MeshInfoContainer *visibleGeometry)
 {
 	GtpVisibility::GeometryList::iterator geometryIt;
@@ -323,5 +314,5 @@
 									GtpVisibility::QueryList::iterator &projQueryIt,
 									GtpVisibility::PatchList *patchList, 
-									InfoContainer<GtpVisibility::PatchInfo> *visiblePatches)
+									GtpVisibility::PatchInfoContainer *visiblePatches)
 {
 	GtpVisibility::PatchList::iterator patchIt;
@@ -348,5 +339,5 @@
 							GtpVisibility::QueryList::iterator &projQueryIt,
 							GtpVisibility::GeometryList *geometryList, 
-							InfoContainer<GtpVisibility::MeshInfo> *visibleGeometry,
+							GtpVisibility::MeshInfoContainer *visibleGeometry,
 							bool relativeVisibility)
 {
@@ -383,5 +374,5 @@
 							GtpVisibility::QueryList::iterator &projQueryIt,
 							GtpVisibility::PatchList *patchList, 
-							InfoContainer<GtpVisibility::PatchInfo> *visiblePatches,
+							GtpVisibility::PatchInfoContainer *visiblePatches,
 							bool relativeVisibility)
 {
@@ -415,8 +406,9 @@
 //-----------------------------------------------------------------------
 void  OcclusionQueriesQueryManager::RemoveDuplicateNodes(
-					InfoContainer<GtpVisibility::NodeInfo> *visibleNodes)
-{
-	sort(visibleNodes->begin(), visibleNodes->end(), nodeinfo_lower);
-	InfoContainer<GtpVisibility::NodeInfo>::iterator visibleNodesIt,
+					GtpVisibility::NodeInfoContainer *visibleNodes)
+{
+	sort(visibleNodes->begin(), visibleNodes->end(), nodeinfo_lt);
+
+	GtpVisibility::NodeInfoContainer::iterator visibleNodesIt,
 		visibleNodesIt_end = visibleNodes->end();
 	
@@ -426,5 +418,5 @@
 		++visibleNodesIt)
 	{
-		if (!nodeInfo || (nodeInfo->GetNode() != (*visibleNodesIt).GetNode()))
+		if (!nodeInfo || (nodeInfo->GetSource() != (*visibleNodesIt).GetSource()))
 		{
 			nodeInfo = &(*visibleNodesIt);
@@ -437,14 +429,14 @@
 	
 	// physically delete duplicates
-	visibleNodes->erase( std::unique(visibleNodes->begin(), 
-		visibleNodes->end(), nodeinfo_eq), visibleNodes->end());
+	visibleNodes->erase(std::unique(visibleNodes->begin(), visibleNodes->end(), nodeinfo_eq),
+						visibleNodes->end());
 }
 //-----------------------------------------------------------------------
 void  OcclusionQueriesQueryManager::RemoveDuplicateGeometry(
-				InfoContainer<GtpVisibility::MeshInfo> *visibleGeometry)
-{
-	sort(visibleGeometry->begin(), visibleGeometry->end(), meshinfo_lower);
-	
-	InfoContainer<GtpVisibility::MeshInfo>::iterator visibleGeomIt,
+				GtpVisibility::MeshInfoContainer *visibleGeometry)
+{
+	sort(visibleGeometry->begin(), visibleGeometry->end(), meshinfo_lt);
+	
+	GtpVisibility::MeshInfoContainer::iterator visibleGeomIt,
 			visibleGeomIt_end = visibleGeometry->end();
 
@@ -454,5 +446,5 @@
 		++visibleGeomIt)
 	{
-		if (!geomInfo || (geomInfo->GetMesh() != (*visibleGeomIt).GetMesh()))
+		if (!geomInfo || (geomInfo->GetSource() != (*visibleGeomIt).GetSource()))
 		{
 			geomInfo = &(*visibleGeomIt);
@@ -465,14 +457,14 @@
 
 	// physically delete duplicates
-	visibleGeometry->erase(std::unique(visibleGeometry->begin(), visibleGeometry->end(), 
-		meshinfo_eq), visibleGeometry->end());
+	visibleGeometry->erase(std::unique(visibleGeometry->begin(), visibleGeometry->end(), meshinfo_eq), 
+						   visibleGeometry->end());
 }
 //-----------------------------------------------------------------------
 void  OcclusionQueriesQueryManager::RemoveDuplicatePatches(
-				InfoContainer<GtpVisibility::PatchInfo> *visiblePatches)
-{
-	sort(visiblePatches->begin(), visiblePatches->end(), patchinfo_lower);
-	
-	InfoContainer<GtpVisibility::PatchInfo>::iterator visiblePatchIt,
+				GtpVisibility::PatchInfoContainer *visiblePatches)
+{
+	sort(visiblePatches->begin(), visiblePatches->end(), patchinfo_lt);
+	
+	GtpVisibility::PatchInfoContainer::iterator visiblePatchIt,
 			visiblePatchIt_end = visiblePatches->end();
 
@@ -482,5 +474,5 @@
 		++visiblePatchIt)
 	{
-		if (!patchInfo || (patchInfo->GetPatch() != (*visiblePatchIt).GetPatch()))
+		if (!patchInfo || (patchInfo->GetSource() != (*visiblePatchIt).GetSource()))
 		{
 			patchInfo = &(*visiblePatchIt);
@@ -493,6 +485,6 @@
 
 	// physically delete duplicates
-	visiblePatches->erase(std::unique(visiblePatches->begin(), visiblePatches->end(), 
-		patchinfo_eq), visiblePatches->end());
+	visiblePatches->erase(std::unique(visiblePatches->begin(), visiblePatches->end(), patchinfo_eq), 
+						  visiblePatches->end());
 }
 //-----------------------------------------------------------------------
