Index: trunk/VUT/GtpVisibility/include/HierarchyInterface.h
===================================================================
--- trunk/VUT/GtpVisibility/include/HierarchyInterface.h	(revision 345)
+++ trunk/VUT/GtpVisibility/include/HierarchyInterface.h	(revision 370)
@@ -10,9 +10,11 @@
 enum  CullingType {QUERY_CULLED, FRUSTUM_CULLED};
 
-typedef std::vector<HierarchyNode *> HierarchyNodeList;
-typedef std::vector<GtpVisibility::Mesh *> GeometryList;
-typedef std::vector<GtpVisibility::Patch *> PatchList;
+typedef std::vector<HierarchyNode *> NodeVector;
+typedef std::vector<GtpVisibility::Mesh *> GeometryVector;
+typedef std::vector<GtpVisibility::Patch *> PatchVector;
 typedef std::pair<HierarchyNode *, OcclusionQuery *> QueryPair;
+typedef std::pair<HierarchyNode *, bool> PendingQuery;
 typedef std::queue<QueryPair> QueryQueue;
+typedef std::queue<PendingQuery> PendingQueue;
 
 
@@ -136,5 +138,5 @@
 	*/
 	virtual void GetNodeGeometryList(GtpVisibility::HierarchyNode *node,	
-					 		 GeometryList *geometryList, 
+					 		 GeometryVector *geometryList, 
 							 bool includeChildren) = 0;
 
Index: trunk/VUT/GtpVisibility/scripts/GtpVisibility.vcproj
===================================================================
--- trunk/VUT/GtpVisibility/scripts/GtpVisibility.vcproj	(revision 316)
+++ trunk/VUT/GtpVisibility/scripts/GtpVisibility.vcproj	(revision 370)
@@ -103,4 +103,7 @@
 			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
 			<File
+				RelativePath="..\src\BatchedQueriesCullingManager.cpp">
+			</File>
+			<File
 				RelativePath="..\src\CoherentHierarchicalCullingManager.cpp">
 			</File>
@@ -137,4 +140,7 @@
 			Filter="h;hpp;hxx;hm;inl;inc;xsd"
 			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+			<File
+				RelativePath="..\include\BatchedQueriesCullingManager.h">
+			</File>
 			<File
 				RelativePath="..\include\CoherentHierarchicalCullingManager.h">
Index: trunk/VUT/GtpVisibility/src/VisibilityManager.cpp
===================================================================
--- trunk/VUT/GtpVisibility/src/VisibilityManager.cpp	(revision 254)
+++ trunk/VUT/GtpVisibility/src/VisibilityManager.cpp	(revision 370)
@@ -5,4 +5,5 @@
 #include "DummyPreprocessingManager.h"
 #include "DummyQueryManager.h"
+#include "BatchedQueriesCullingManager.h"
 
 namespace GtpVisibility {
@@ -45,4 +46,5 @@
 		case VisibilityEnvironment::STOP_AND_WAIT_CULLING:
 			mCullingManager = new StopAndWaitCullingManager();
+				//new BatchedQueriesCullingManager();
 			break;
 
Index: trunk/VUT/work/iv/TestCullingIVApplication.cpp
===================================================================
--- trunk/VUT/work/iv/TestCullingIVApplication.cpp	(revision 348)
+++ trunk/VUT/work/iv/TestCullingIVApplication.cpp	(revision 370)
@@ -92,6 +92,7 @@
 	mSceneMgr->setOption("NodeVizScale", &scale);
 	// HACK: change this to relative path
-	String path = "E:/svn/gametools/trunk/VUT/Ogre/resources/";
-		
+	//String path = "E:/svn/gametools/trunk/VUT/Ogre/resources/";
+	String path = "D:/svn/trunk/VUT/Ogre/resources/";
+	
 	SceneNode *node1 = mSceneMgr->getRootSceneNode()->createChildSceneNode("Node1");
 	SceneNode *node2 = mSceneMgr->getRootSceneNode()->createChildSceneNode("Node2");
Index: trunk/VUT/work/iv/Demo_IV.vcproj
===================================================================
--- trunk/VUT/work/iv/Demo_IV.vcproj	(revision 226)
+++ trunk/VUT/work/iv/Demo_IV.vcproj	(revision 370)
@@ -175,4 +175,7 @@
 			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
 		</Filter>
+		<File
+			RelativePath=".\VTune\Demo_IV.vpj">
+		</File>
 	</Files>
 	<Globals>
Index: trunk/VUT/GtpVisibilityPreprocessor/scripts/Preprocessor.vcproj
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/scripts/Preprocessor.vcproj	(revision 361)
+++ trunk/VUT/GtpVisibilityPreprocessor/scripts/Preprocessor.vcproj	(revision 370)
@@ -347,4 +347,7 @@
 			</File>
 		</Filter>
+		<File
+			RelativePath=".\VTune\Preprocessor.vpj">
+		</File>
 	</Files>
 	<Globals>
Index: trunk/VUT/GtpVisibilityPreprocessor/scripts/default.env
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/scripts/default.env	(revision 367)
+++ trunk/VUT/GtpVisibilityPreprocessor/scripts/default.env	(revision 370)
@@ -56,5 +56,5 @@
 
 Sampling {
-	totalSamples	300000
+	totalSamples	1000000
 	samplesPerPass  3
 }
@@ -82,5 +82,5 @@
 	#	input fromViewCells
 	#	input fromSceneGeometry
-		samples 10000
+		samples 200000
 		sideTolerance 0.005
 	}
@@ -120,5 +120,5 @@
 	#splitPlaneStrategy 130
 	
-	splitPlaneStrategy 1024
+	splitPlaneStrategy 130
 	
 	maxCandidates 80
@@ -128,11 +128,11 @@
 		maxRays 200
 		maxPolygons 5
-		maxDepth 100
+		maxDepth 50
 		
 		# axis aligned splits
 		AxisAligned {
 			maxPolys 5000
-			maxRays 5000
-			maxObjects 2000
+			maxRays 600
+			maxObjects 20
 			maxCostRatio 0.9
 			ct_div_ci 0.5
@@ -145,5 +145,5 @@
 	
 	PostProcessing {
-		samples 100000
+		samples 200000
 	}
 		
Index: trunk/VUT/GtpVisibilityPreprocessor/src/Ray.h
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/src/Ray.h	(revision 369)
+++ trunk/VUT/GtpVisibilityPreprocessor/src/Ray.h	(revision 370)
@@ -56,4 +56,18 @@
   };
 
+  struct BspIntersection {
+    // the point of intersection
+    float mT;
+
+    BspLeaf *mLeaf;
+
+    BspIntersection(const float t, BspLeaf *l):
+	mT(t), mLeaf(l) {}
+
+    BspIntersection() {}
+
+    bool operator<(const BspIntersection &b) const {
+      return mT	<b.mT; }
+  };
 
   // I should have some abstract cell data type !!! here
@@ -63,5 +77,5 @@
   
   vector<Intersection> intersections;
-  vector<BspLeaf *> bspLeaves;
+  vector<BspIntersection> bspIntersections;
   vector<KdLeaf *> kdLeaves;
   vector<MeshInstance *> meshes;
Index: trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.cpp
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.cpp	(revision 367)
+++ trunk/VUT/GtpVisibilityPreprocessor/src/ViewCellBsp.cpp	(revision 370)
@@ -321,5 +321,6 @@
 		}
 
-		ray->bspLeaves.push_back(this);
+		// warning: not ordered
+		ray->bspIntersections.push_back(Ray::BspIntersection((*it)->mMinT, this));
 	}
 }
@@ -1621,5 +1622,5 @@
 			if (!leaf->mViewCell->Mailed())
 			{
-				ray.bspLeaves.push_back(leaf);
+				ray.bspIntersections.push_back(Ray::BspIntersection(maxt, leaf));
 				leaf->mViewCell->Mail();
 				++ hits;
@@ -2299,5 +2300,5 @@
 
 	BoundedRayContainer::const_iterator rit, rit_end = rays.end();
-	vector<BspLeaf *>::const_iterator lit;
+	vector<Ray::BspIntersection>::const_iterator iit;
 
 	ViewCell::NewMail();
@@ -2307,9 +2308,11 @@
 		Ray *ray = (*rit)->mRay;
 		
-		for (lit = ray->bspLeaves.begin(); lit != ray->bspLeaves.end(); ++ lit)
-		{
-			if ((*lit)->mViewCell->Mailed())
+		for (iit = ray->bspIntersections.begin(); iit != ray->bspIntersections.end(); ++ iit)
+		{
+			BspViewCell *vc = (*iit).mLeaf->mViewCell;
+
+			if (vc->Mailed())
 			{
-				pvsSize += (*lit)->mViewCell->GetPvs().GetSize();
+				pvsSize += vc->GetPvs().GetSize();
 			}
 		}
Index: trunk/VUT/GtpVisibilityPreprocessor/src/default.env
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/src/default.env	(revision 369)
+++ trunk/VUT/GtpVisibilityPreprocessor/src/default.env	(revision 370)
@@ -61,10 +61,13 @@
 
 ViewCells {
-	hierarchy kdTree
-	#hierarchy bspTree
+	#hierarchy kdTree
+	hierarchy bspTree
 	# hierarchy sceneDependent
 	
 	height 5.0
 	maxViewCells 0
+	
+	minPvsDif 100
+#	maxPvsSize 200
 	
 #	filename ../data/atlanta/atlanta_viewcells_large.x3d
@@ -74,7 +77,4 @@
 }
 
-
-
-
 BspTree {
 	Construction {
@@ -82,5 +82,5 @@
 	#	input fromViewCells
 	#	input fromSceneGeometry
-		samples 100000
+		samples 10000
 		sideTolerance 0.005
 	}
@@ -97,4 +97,5 @@
 	# least ray splits     = 256
 	# balanced rays        = 512
+	# pvs                  = 1024
 
 	# least splits + balanced polygons
@@ -119,19 +120,19 @@
 	#splitPlaneStrategy 130
 	
-	splitPlaneStrategy 130
+	splitPlaneStrategy 1024
 	
 	maxCandidates 80
 	
 	Termination {
-	# autopartition
-		maxRays 80
-		maxPolygons 0
+		# autopartition
+		maxRays 200
+		maxPolygons 5
 		maxDepth 100
 		
 		# axis aligned splits
 		AxisAligned {
-			maxPolys 500
-			maxRays 300
-			maxObjects 20
+			maxPolys 5000
+			maxRays 5000
+			maxObjects 2000
 			maxCostRatio 0.9
 			ct_div_ci 0.5
@@ -142,4 +143,8 @@
 		splitBorder 0.01
 	}
+	
+	PostProcessing {
+		samples 100000
+	}
 		
 	# if split polys are stored for visualization
Index: trunk/VUT/GtpVisibilityPreprocessor/src/SamplingPreprocessor.cpp
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/src/SamplingPreprocessor.cpp	(revision 369)
+++ trunk/VUT/GtpVisibilityPreprocessor/src/SamplingPreprocessor.cpp	(revision 370)
@@ -34,5 +34,5 @@
   ray.kdLeaves.clear();
   ray.meshes.clear();
-  ray.bspLeaves.clear();
+  ray.bspIntersections.clear();
 
   //  cout<<point<<" "<<direction<<endl;
@@ -124,16 +124,18 @@
  
 	// object can be seen from the view cell => add to view cell pvs
-	for (j=0; j < ray.bspLeaves.size(); ++ j) 
-	{ 	// if ray not in unbounded space
-		if (ray.bspLeaves[j]->GetViewCell() != &mUnbounded)
+	for (j=0; j < ray.bspIntersections.size(); ++ j)
+	{ 	
+		BspLeaf *leaf = ray.bspIntersections[j].mLeaf;
+		// if ray not in unbounded space
+		if (leaf->GetViewCell() != &mUnbounded)
 			contributingSamples += 
-				ray.bspLeaves[j]->GetViewCell()->GetPvs().AddSample(obj);
+				leaf->GetViewCell()->GetPvs().AddSample(obj);
 	}
  
 	// rays passing through this viewcell
 	if (mPass > 1)
-		for (j=1; j < ((int)ray.bspLeaves.size() - 1); ++ j) 
-		{
-			BspLeaf *leaf = ray.bspLeaves[j];
+		for (j=1; j < ((int)ray.bspIntersections.size() - 1); ++ j) 
+		{
+			BspLeaf *leaf = ray.bspIntersections[j].mLeaf;
 
 			if (leaf->GetViewCell() != &mUnbounded)
@@ -679,5 +681,5 @@
 	int merged = 0;
 	RayContainer::const_iterator rit, rit_end = rays.end();
-	vector<BspLeaf *>::const_iterator lit;
+	vector<Ray::BspIntersection>::const_iterator iit;
 
 	for (rit = rays.begin(); rit != rays.end(); ++ rit)
@@ -685,15 +687,15 @@
 		// traverse leaves stored in the rays and compare and merge consecutive
 		// leaves (i.e., the neighbors in the tree)
-		if ((*rit)->bspLeaves.empty())
+		if ((*rit)->bspIntersections.empty())
 			continue;
 
-		lit = (*rit)->bspLeaves.begin();
-
-		BspLeaf *previousLeaf = *lit;
-		++ lit;
-		
-		for (; lit != (*rit)->bspLeaves.end(); ++ lit)
-		{
-			BspLeaf *leaf = *lit;
+		iit = (*rit)->bspIntersections.begin();
+
+		BspLeaf *previousLeaf = (*iit).mLeaf;
+		++ iit;
+		
+		for (; iit != (*rit)->bspIntersections.end(); ++ iit)
+		{
+			BspLeaf *leaf = (*iit).mLeaf;
 
 			if (mBspTree->ShouldMerge(leaf, previousLeaf))
@@ -784,9 +786,11 @@
 		Ray *ray = mSampleRays[k];
 
-		for (int j = 0; j < (int)ray->bspLeaves.size(); ++ j)
-		{
+		for (int j = 0; j < (int)ray->bspIntersections.size(); ++ j)
+		{
+			BspLeaf *leaf = ray->bspIntersections[j].mLeaf;
+
 			for (int i = 0; i < (int)bspLeaves.size(); ++ i)
 			{
-				if (bspLeaves[i]->GetViewCell() == ray->bspLeaves[j]->GetViewCell()) 
+				if (bspLeaves[i]->GetViewCell() == leaf->GetViewCell()) 
 				{
 					vcRays[i].push_back(*ray);
Index: trunk/VUT/GtpVisibilityPreprocessor/src/Camera.cpp
===================================================================
--- trunk/VUT/GtpVisibilityPreprocessor/src/Camera.cpp	(revision 362)
+++ trunk/VUT/GtpVisibilityPreprocessor/src/Camera.cpp	(revision 370)
@@ -132,5 +132,5 @@
   ray.kdLeaves.clear();
   ray.meshes.clear();
-  ray.bspLeaves.clear();
+  ray.bspIntersections.clear();
 
   ray.Init(mPosition, target, Ray::LOCAL_RAY);
Index: trunk/VUT/Ogre/include/OgreOcclusionQueriesQueryManager.h
===================================================================
--- trunk/VUT/Ogre/include/OgreOcclusionQueriesQueryManager.h	(revision 316)
+++ trunk/VUT/Ogre/include/OgreOcclusionQueriesQueryManager.h	(revision 370)
@@ -39,5 +39,5 @@
 	void CollectGeometryVisibility(GtpVisibility::QueryList::iterator &visQueryIt, 
 								   GtpVisibility::QueryList::iterator &projQueryIt,
-								   GtpVisibility::GeometryList *geometryList, 
+								   GtpVisibility::GeometryVector *geometryList, 
 								   GtpVisibility::MeshInfoContainer *visibleGeometry,
 								   bool relativeVisibility);
@@ -45,20 +45,20 @@
 	void CollectNodeVisibility(GtpVisibility::QueryList::iterator &visQueryIt, 
 							   GtpVisibility::QueryList::iterator &projQueryIt,
-							   GtpVisibility::HierarchyNodeList *nodeList, 
+							   GtpVisibility::NodeVector *nodeList, 
 							   GtpVisibility::NodeInfoContainer *visibleNodes,
 							   bool relativeVisibility);
 
 	void CollectRelativeGeometryVisibilityForItemBuffer(GtpVisibility::QueryList::iterator &projQueryIt,
-												GtpVisibility::GeometryList *geometryList, 
+												GtpVisibility::GeometryVector *geometryList, 
 												GtpVisibility::MeshInfoContainer *visibleGeometry);
 
 	void CollectRelativePatchVisibilityForItemBuffer(
 									GtpVisibility::QueryList::iterator &projQueryIt,
-									GtpVisibility::PatchList *patchList, 
+									GtpVisibility::PatchVector *patchList, 
 									GtpVisibility::PatchInfoContainer *visiblePatches);
 
 	void CollectPatchVisibility(GtpVisibility::QueryList::iterator &visQueryIt, 
 								GtpVisibility::QueryList::iterator &projQueryIt,
-								GtpVisibility::PatchList *patchList, 
+								GtpVisibility::PatchVector *patchList, 
 								GtpVisibility::PatchInfoContainer *visiblePatches,
 								bool relativeVisibility);
@@ -73,5 +73,5 @@
 	*/
 	virtual void GetNodePatchList(GtpVisibility::HierarchyNode *node,	
-					 			  GtpVisibility::PatchList *patchList);
+					 			  GtpVisibility::PatchVector *patchList);
 
 	int mItemBufferMode;
Index: trunk/VUT/Ogre/include/OgreSceneNodeHierarchyInterface.h
===================================================================
--- trunk/VUT/Ogre/include/OgreSceneNodeHierarchyInterface.h	(revision 345)
+++ trunk/VUT/Ogre/include/OgreSceneNodeHierarchyInterface.h	(revision 370)
@@ -43,5 +43,5 @@
 	
 	void GetNodeGeometryList(GtpVisibility::HierarchyNode *node,	
-					 GtpVisibility::GeometryList *geometryList, 
+					 GtpVisibility::GeometryVector *geometryList, 
 					 bool includeChildren);
 
Index: trunk/VUT/Ogre/include/OgreOctreeHierarchyInterface.h
===================================================================
--- trunk/VUT/Ogre/include/OgreOctreeHierarchyInterface.h	(revision 345)
+++ trunk/VUT/Ogre/include/OgreOctreeHierarchyInterface.h	(revision 370)
@@ -48,5 +48,5 @@
 
 	void GetNodeGeometryList(GtpVisibility::HierarchyNode *node,
-							 GtpVisibility::GeometryList *geometryList, 
+							 GtpVisibility::GeometryVector *geometryList, 
 							 bool includeChildren);
 	
Index: trunk/VUT/Ogre/src/OgreSceneNodeHierarchyInterface.cpp
===================================================================
--- trunk/VUT/Ogre/src/OgreSceneNodeHierarchyInterface.cpp	(revision 345)
+++ trunk/VUT/Ogre/src/OgreSceneNodeHierarchyInterface.cpp	(revision 370)
@@ -137,5 +137,5 @@
 //-----------------------------------------------------------------------
 void SceneNodeHierarchyInterface::GetNodeGeometryList(GtpVisibility::HierarchyNode *node,	
-											  GtpVisibility::GeometryList *geometryList, 
+											  GtpVisibility::GeometryVector *geometryList, 
 											  bool includeChildren)
 {
Index: trunk/VUT/Ogre/src/OgreOctreeHierarchyInterface.cpp
===================================================================
--- trunk/VUT/Ogre/src/OgreOctreeHierarchyInterface.cpp	(revision 346)
+++ trunk/VUT/Ogre/src/OgreOctreeHierarchyInterface.cpp	(revision 370)
@@ -157,5 +157,5 @@
 //-----------------------------------------------------------------------
 void OctreeHierarchyInterface::GetNodeGeometryList(GtpVisibility::HierarchyNode *node,	
-										   GtpVisibility::GeometryList *geometryList, 
+										   GtpVisibility::GeometryVector *geometryList, 
 										   bool includeChildren)
 {
Index: trunk/VUT/Ogre/src/OgreOcclusionQueriesQueryManager.cpp
===================================================================
--- trunk/VUT/Ogre/src/OgreOcclusionQueriesQueryManager.cpp	(revision 318)
+++ trunk/VUT/Ogre/src/OgreOcclusionQueriesQueryManager.cpp	(revision 370)
@@ -65,8 +65,8 @@
 	
 	// rendered visibile hierarchy nodes from previous rendering
-	GtpVisibility::HierarchyNodeList *visNodes = mHierarchyInterface->GetVisibleNodes();
-	GtpVisibility::HierarchyNodeList::iterator visNodesIt, visNodesIt_end = visNodes->end();
-
-    GtpVisibility::HierarchyNodeList nodeList;
+	GtpVisibility::NodeVector *visNodes = mHierarchyInterface->GetVisibleNodes();
+	GtpVisibility::NodeVector::iterator visNodesIt, visNodesIt_end = visNodes->end();
+
+    GtpVisibility::NodeVector nodeList;
 
 	if (mQueryModes & NODE_VISIBILITY)
@@ -78,8 +78,8 @@
 	}
 
-	GtpVisibility::HierarchyNodeList::iterator nodeIt, nodeIt_end = nodeList.end();
+	GtpVisibility::NodeVector::iterator nodeIt, nodeIt_end = nodeList.end();
 
 	// vector for storing entities of meshes
-	GtpVisibility::GeometryList geometryList;
+	GtpVisibility::GeometryVector geometryList;
 	
 	// store geometry of the hierarchy nodes in a geometry list
@@ -93,8 +93,8 @@
 	
 	// geometry list iterator
-	GtpVisibility::GeometryList::iterator geometryIt, geometryIt_end = geometryList.end();
+	GtpVisibility::GeometryVector::iterator geometryIt, geometryIt_end = geometryList.end();
 
 	// vector for storing subentities of meshes
-	GtpVisibility::PatchList patchList;
+	GtpVisibility::PatchVector patchList;
 
 	// store patchges of the geometries in a patch list
@@ -107,5 +107,5 @@
 	}
 
-	GtpVisibility::PatchList::iterator patchIt, patchIt_end = patchList.end();
+	GtpVisibility::PatchVector::iterator patchIt, patchIt_end = patchList.end();
 
 	// to obtain the correct number of projected pixels, depth write must be disabled
@@ -229,9 +229,9 @@
 						GtpVisibility::QueryList::iterator &visQueryIt, 
 						GtpVisibility::QueryList::iterator &projQueryIt,
-						GtpVisibility::HierarchyNodeList *nodeList,  
+						GtpVisibility::NodeVector *nodeList,  
 						GtpVisibility::NodeInfoContainer *visibleNodes,
 						bool relativeVisibility)
 {
-	GtpVisibility::HierarchyNodeList::iterator nodeIt;
+	GtpVisibility::NodeVector::iterator nodeIt;
 
 	//-- queries for nodes
@@ -263,8 +263,8 @@
 void OcclusionQueriesQueryManager::CollectRelativeGeometryVisibilityForItemBuffer(
 									GtpVisibility::QueryList::iterator &projQueryIt,
-									GtpVisibility::GeometryList *geometryList, 
+									GtpVisibility::GeometryVector *geometryList, 
 									GtpVisibility::MeshInfoContainer *visibleGeometry)
 {
-	GtpVisibility::GeometryList::iterator geometryIt;
+	GtpVisibility::GeometryVector::iterator geometryIt;
 
 	//-- queries for geometry
@@ -287,8 +287,8 @@
 void OcclusionQueriesQueryManager::CollectRelativePatchVisibilityForItemBuffer(
 									GtpVisibility::QueryList::iterator &projQueryIt,
-									GtpVisibility::PatchList *patchList, 
+									GtpVisibility::PatchVector *patchList, 
 									GtpVisibility::PatchInfoContainer *visiblePatches)
 {
-	GtpVisibility::PatchList::iterator patchIt;
+	GtpVisibility::PatchVector::iterator patchIt;
 
 	//-- queries for geometry
@@ -312,9 +312,9 @@
 							GtpVisibility::QueryList::iterator &visQueryIt, 
 							GtpVisibility::QueryList::iterator &projQueryIt,
-							GtpVisibility::GeometryList *geometryList, 
+							GtpVisibility::GeometryVector *geometryList, 
 							GtpVisibility::MeshInfoContainer *visibleGeometry,
 							bool relativeVisibility)
 {
-	GtpVisibility::GeometryList::iterator geometryIt;
+	GtpVisibility::GeometryVector::iterator geometryIt;
 
 	//-- queries for geometry
@@ -347,9 +347,9 @@
 							GtpVisibility::QueryList::iterator &visQueryIt, 
 							GtpVisibility::QueryList::iterator &projQueryIt,
-							GtpVisibility::PatchList *patchList, 
+							GtpVisibility::PatchVector *patchList, 
 							GtpVisibility::PatchInfoContainer *visiblePatches,
 							bool relativeVisibility)
 {
-	GtpVisibility::PatchList::iterator patchIt;
+	GtpVisibility::PatchVector::iterator patchIt;
 
 	//-- queries for patch
@@ -464,11 +464,11 @@
 //-----------------------------------------------------------------------
 void OcclusionQueriesQueryManager::GetNodePatchList(GtpVisibility::HierarchyNode *node,	
-					 			 					GtpVisibility::PatchList *patchList)
-{
-	GtpVisibility::GeometryList geomList;
+					 			 					GtpVisibility::PatchVector *patchList)
+{
+	GtpVisibility::GeometryVector geomList;
 	mHierarchyInterface->GetNodeGeometryList(node, &geomList, false);
 
 	// geometry list iterator
-	GtpVisibility::GeometryList::iterator geomIt, geomIt_end = geomList.end();
+	GtpVisibility::GeometryVector::iterator geomIt, geomIt_end = geomList.end();
 
 	for (geomIt = geomList.begin(); geomIt != geomIt_end; ++geomIt)
Index: trunk/VUT/Ogre/resources/materials/scripts/natFX_Tree1_LOD2.material
===================================================================
--- trunk/VUT/Ogre/resources/materials/scripts/natFX_Tree1_LOD2.material	(revision 183)
+++ trunk/VUT/Ogre/resources/materials/scripts/natFX_Tree1_LOD2.material	(revision 370)
@@ -31,5 +31,5 @@
 			ambient 1 1 1 1
 			diffuse 1 1 1 1
-			specular 0.15 0.107 0.039 20
+			
 			emissive 0 0 0
 
@@ -52,5 +52,5 @@
 			ambient 1 1 1 1
 			diffuse 1 1 1 1
-			specular 0.15 0.107 0.039 20
+			
 			emissive 0 0 0
 
