Index: trunk/VUT/Ogre/include/OgreVisibilityTerrainSceneManager.h
===================================================================
--- trunk/VUT/Ogre/include/OgreVisibilityTerrainSceneManager.h	(revision 202)
+++ trunk/VUT/Ogre/include/OgreVisibilityTerrainSceneManager.h	(revision 254)
@@ -128,11 +128,11 @@
 	/// if we use a depth pass (i.e., fill only the depth buffer in the first pass)
 	bool mUseDepthPass;
-	/// if we currently render the depth pass
-	bool mRenderDepthPass;
+	/// if we currently rendering the depth pass
+	bool mIsDepthPassPhase;
 	
 	/// if we use an item buffer for rendering (i.e., object ids as color codes
 	bool mUseItemBuffer;
 	/// if we currently render the item buffer 
-	bool mRenderItemBuffer;
+	bool mIsItemBufferPhase;
 
 	/// if depth write should be enabled
Index: trunk/VUT/Ogre/include/OgreVisibilityOctreeSceneManager.h
===================================================================
--- trunk/VUT/Ogre/include/OgreVisibilityOctreeSceneManager.h	(revision 202)
+++ trunk/VUT/Ogre/include/OgreVisibilityOctreeSceneManager.h	(revision 254)
@@ -86,4 +86,6 @@
 	void renderModulativeStencilShadowedQueueGroupObjects(RenderQueueGroup* pGroup);
 
+	void loadVisibilityConfig(const String& filename);
+
 protected:
 	
@@ -123,10 +125,10 @@
 	bool mUseDepthPass;
 	/// flag indicating if we currently render the depth pass
-	bool mRenderDepthPass;
+	bool mIsDepthPassPhase;
 
 	/// if we use an item buffer for rendering (i.e., object ids as color codes
 	bool mUseItemBuffer;
 	/// if we currently render the item buffer 
-	bool mRenderItemBuffer;
+	bool mIsItemBufferPhase;
 
 	/// if depth write should be enabled
Index: trunk/VUT/Ogre/src/OgreVisibilityTerrainSceneManager.cpp
===================================================================
--- trunk/VUT/Ogre/src/OgreVisibilityTerrainSceneManager.cpp	(revision 202)
+++ trunk/VUT/Ogre/src/OgreVisibilityTerrainSceneManager.cpp	(revision 254)
@@ -24,8 +24,8 @@
 mDelayRenderTransparents(true),
 mUseDepthPass(false),
-mRenderDepthPass(false),
+mIsDepthPassPhase(false),
 mUseItemBuffer(false),
 //mUseItemBuffer(true),
-mRenderItemBuffer(false),
+mIsItemBufferPhase(false),
 mCurrentEntityId(1),
 mEnableDepthWrite(true),
@@ -147,8 +147,8 @@
 {
 	// TODO: setting vertex program is not efficient
-	//Pass *usedPass = ((mRenderDepthPass && !pass->hasVertexProgram()) ? mDepthPass : pass); 
+	//Pass *usedPass = ((mIsDepthPassPhase && !pass->hasVertexProgram()) ? mDepthPass : pass); 
 	
 	// set depth fill pass if we currently do not make an aabb occlusion query
-	Pass *usedPass = (mRenderDepthPass && !mHierarchyInterface->IsBoundingBoxQuery() ? 
+	Pass *usedPass = (mIsDepthPassPhase && !mHierarchyInterface->IsBoundingBoxQuery() ? 
 					  mDepthPass : pass);
 		
@@ -157,5 +157,5 @@
 	// set illumination stage to NONE so no shadow material is used 
 	// for depth pass or for occlusion query
-	if (mRenderDepthPass || mHierarchyInterface->IsBoundingBoxQuery())
+	if (mIsDepthPassPhase || mHierarchyInterface->IsBoundingBoxQuery())
 	{
 		mIlluminationStage = IRS_NONE;
@@ -163,5 +163,5 @@
 	
 	// --- set vertex program of current pass in order to set correct depth
-	if (mExecuteVertexProgramForAllPasses && mRenderDepthPass && pass->hasVertexProgram())
+	if (mExecuteVertexProgramForAllPasses && mIsDepthPassPhase && pass->hasVertexProgram())
 	{
 		// add vertex program of current pass to depth pass
@@ -315,6 +315,6 @@
 
 		//-- reset parameters
-		mRenderDepthPass = false;
-		mRenderItemBuffer = false;
+		mIsDepthPassPhase = false;
+		mIsItemBufferPhase = false;
 		mSkipTransparents = false;
 		mLeavePassesInQueue = 0;
@@ -501,5 +501,5 @@
 {
 	// skip all but first pass if we are doing the depth pass
-	if ((mRenderDepthPass || mRenderItemBuffer) && pass->getIndex() > 0)
+	if ((mIsDepthPassPhase || mIsItemBufferPhase) && pass->getIndex() > 0)
 	{
 		return false;
@@ -510,5 +510,5 @@
 void VisibilityTerrainSceneManager::renderQueueGroupObjects(RenderQueueGroup* pGroup)
 {
-	if (!mRenderItemBuffer)
+	if (!mIsItemBufferPhase)
 	{
 		TerrainSceneManager::renderQueueGroupObjects(pGroup);
@@ -640,10 +640,10 @@
 
 	// set depth pass flag before rendering
-	mRenderDepthPass = mUseDepthPass;
+	mIsDepthPassPhase = mUseDepthPass;
 
 	// item buffer needs full ambient lighting to use item colors as unique id
 	if (mUseItemBuffer) 
 	{
-		mRenderItemBuffer = true;
+		mIsItemBufferPhase = true;
 		setAmbientLight(ColourValue(1,1,1,1));
 	}
Index: trunk/VUT/Ogre/src/OgreVisibilityOptionsManager.cpp
===================================================================
--- trunk/VUT/Ogre/src/OgreVisibilityOptionsManager.cpp	(revision 187)
+++ trunk/VUT/Ogre/src/OgreVisibilityOptionsManager.cpp	(revision 254)
@@ -15,4 +15,5 @@
 	if (key == "Algorithm")
 	{
+		// delete old queries (not needed for e.g., view frustum culling)
 		mHierarchyInterface->DeleteQueries();
 		mVisibilityManager->SetCullingManager(*static_cast<const 
Index: trunk/VUT/Ogre/src/OgreVisibilityOctreeSceneManager.cpp
===================================================================
--- trunk/VUT/Ogre/src/OgreVisibilityOctreeSceneManager.cpp	(revision 202)
+++ trunk/VUT/Ogre/src/OgreVisibilityOctreeSceneManager.cpp	(revision 254)
@@ -9,5 +9,5 @@
 #include <OgreEntity.h>
 #include <OgreSubEntity.h>
-
+#include <OgreConfigFile.h>
 
 namespace Ogre {
@@ -24,9 +24,11 @@
 mLeavePassesInQueue(0),
 mDelayRenderTransparents(true),
+//mDelayRenderTransparents(false),
+//mUseDepthPass(true),
 mUseDepthPass(false),
-mRenderDepthPass(false),
+mIsDepthPassPhase(false),
 mUseItemBuffer(false),
 //mUseItemBuffer(true),
-mRenderItemBuffer(false),
+mIsItemBufferPhase(false),
 mCurrentEntityId(1),
 mEnableDepthWrite(true),
@@ -44,4 +46,6 @@
 	// TODO: set maxdepth to reasonable value
 	mMaxDepth = 50;
+
+	//loadVisibilityConfig("GtpVisibility.cfg");
 }
 //-----------------------------------------------------------------------
@@ -145,5 +149,5 @@
 {
 	// set depth fill pass if we currently do not make an aabb occlusion query
-	Pass *usedPass = (mRenderDepthPass && !mHierarchyInterface->IsBoundingBoxQuery() ? 
+	Pass *usedPass = (mIsDepthPassPhase && !mHierarchyInterface->IsBoundingBoxQuery() ? 
 					  mDepthPass : pass);
 
@@ -152,5 +156,5 @@
 	// set illumination stage to NONE so no shadow material is used 
 	// for depth pass or for occlusion query
-	if (mRenderDepthPass || mHierarchyInterface->IsBoundingBoxQuery())
+	if (mIsDepthPassPhase || mHierarchyInterface->IsBoundingBoxQuery())
 	{
 		mIlluminationStage = IRS_NONE;
@@ -158,5 +162,5 @@
 
 	//-- set vertex program of current pass in order to set correct depth
-	if (mRenderDepthPass && mExecuteVertexProgramForAllPasses && pass->hasVertexProgram())
+	if (mIsDepthPassPhase && mExecuteVertexProgramForAllPasses && pass->hasVertexProgram())
     {
 		// add vertex program of current pass to depth pass
@@ -311,6 +315,6 @@
 
 		//-- reset parameters
-		mRenderDepthPass = false;
-		mRenderItemBuffer = false;
+		mIsDepthPassPhase = false;
+		mIsItemBufferPhase = false;
 		mSkipTransparents = false;
 		mIsHierarchicalCulling = false;
@@ -498,5 +502,5 @@
 {
 	// skip all but first pass if we are doing the depth pass
-	if ((mRenderDepthPass || mRenderItemBuffer) && pass->getIndex() > 0)
+	if ((mIsDepthPassPhase || mIsItemBufferPhase) && pass->getIndex() > 0)
 	{
 		return false;
@@ -507,5 +511,5 @@
 void VisibilityOctreeSceneManager::renderQueueGroupObjects(RenderQueueGroup* pGroup)
 {
-	if (!mRenderItemBuffer)
+	if (!mIsItemBufferPhase)
 	{
 		OctreeSceneManager::renderQueueGroupObjects(pGroup);
@@ -513,5 +517,5 @@
 	}
 
-	// --- item buffer
+	//-- renders item buffer
 
     // Iterate through priorities
@@ -559,5 +563,5 @@
 	}
 
-	// -- TRANSPARENT LOOP: must be handled differently 
+	//-- TRANSPARENT LOOP: must be handled differently 
 
 	// transparents are treated either as solids or completely discarded
@@ -637,5 +641,5 @@
 
 	// set depth pass flag before rendering
-	mRenderDepthPass = mUseDepthPass;
+	mIsDepthPassPhase = mUseDepthPass;
 
 	mIsHierarchicalCulling = true; // during hierarchical culling
@@ -644,5 +648,5 @@
 	if (mUseItemBuffer) 
 	{
-		mRenderItemBuffer = true;
+		mIsItemBufferPhase = true;
 		setAmbientLight(ColourValue(1,1,1,1));
 	}
@@ -739,67 +743,7 @@
 		}
 	}
-	else
+	else // render the rest of the passes
 	{
 		OctreeSceneManager::renderAdditiveStencilShadowedQueueGroupObjects(pGroup);
-
-		/*RenderQueueGroup::PriorityMapIterator groupIt = pGroup->getIterator();
-	    LightList lightList;
-		
-		while (groupIt.hasMoreElements())
-		{
-		
-			RenderPriorityGroup* pPriorityGrp = groupIt.getNext();
-
-			// Sort the queue first
-			pPriorityGrp->sort(mCameraInProgress);
-
-			// Clear light list
-			lightList.clear();
-
-			// Now iterate per light
-			mIlluminationStage = IRS_PER_LIGHT;
-	
-		    // Iterate over lights, render all volumes to stencil
-	        LightList::const_iterator li, liend;
-		    liend = mLightsAffectingFrustum.end();
-	
-		    for (li = mLightsAffectingFrustum.begin(); li != liend; ++li)
-			{
-				LogManager::getSingleton().logMessage("iterating over lights");
-				Light* l = *li;
-				// Set light state
-
-				if (l->getCastShadows())
-				{
-					// Clear stencil
-					mDestRenderSystem->clearFrameBuffer(FBT_STENCIL);
-					renderShadowVolumesToStencil(l, mCameraInProgress);
-					// turn stencil check on
-					mDestRenderSystem->setStencilCheckEnabled(true);
-					// NB we render where the stencil is equal to zero to render lit areas
-					mDestRenderSystem->setStencilBufferParams(CMPF_EQUAL, 0);
-				}
-
-				// render lighting passes for this light
-				if (lightList.empty())
-					lightList.push_back(l);
-				else
-					lightList[0] = l;
-				OctreeSceneManager::renderObjects(pPriorityGrp->_getSolidPassesDiffuseSpecular(), false, &lightList);
-
-				// Reset stencil params
-				mDestRenderSystem->setStencilBufferParams();
-				mDestRenderSystem->setStencilCheckEnabled(false);
-				mDestRenderSystem->_setDepthBufferParams();
-
-			}// for each light
-
-			// Now render decal passes, no need to set lights as lighting will be disabled
-			mIlluminationStage = IRS_DECAL;
-			OctreeSceneManager::renderObjects(pPriorityGrp->_getSolidPassesDecal(), false);
-	    }// for each priority
-	
-		// reset lighting stage
-	    mIlluminationStage = IRS_NONE;*/
 	}
 }
@@ -828,3 +772,26 @@
    }
 }
-}   // namespace Ogre
+//-------------------------------------------------------------------------
+void VisibilityOctreeSceneManager::loadVisibilityConfig(const String& filename)
+{
+	/// Set up the options
+	ConfigFile config;
+	String val;
+
+	config.load(filename);
+
+	val = config.getSetting("Algorithm");
+
+    if (!val.empty())
+	{
+		 VisibilityOptionsManager(mVisibilityManager, mHierarchyInterface).setOption("Algorithm", val.c_str());
+	}
+
+	val = config.getSetting("UseDepthPass");
+
+	if (!val.empty())
+	{
+		 setOption("UseDepthPass", val.c_str());
+	}
+}
+}  // namespace Ogre
Index: trunk/VUT/Ogre/resources/materials/scripts/natFX_Tree1_LOD3.material
===================================================================
--- trunk/VUT/Ogre/resources/materials/scripts/natFX_Tree1_LOD3.material	(revision 183)
+++ trunk/VUT/Ogre/resources/materials/scripts/natFX_Tree1_LOD3.material	(revision 254)
@@ -204,5 +204,5 @@
 			texture_unit
 			{
-				texture D:\Profiles\giegl\My Documents\maya\projects\default\sourceimages\_12bb041f_1121354365.png
+				texture _12bb041f_1121354365.png
 				tex_coord_set 0
 				colour_op modulate
@@ -228,5 +228,5 @@
 			texture_unit
 			{
-				texture D:\Profiles\giegl\My Documents\maya\projects\default\sourceimages\_12bb041l_1121354365.png
+				texture _12bb041l_1121354365.png
 				tex_coord_set 0
 				colour_op modulate
@@ -252,5 +252,5 @@
 			texture_unit
 			{
-				texture D:\Profiles\giegl\My Documents\maya\projects\default\sourceimages\_12bb049f_1121354365.png
+				texture _12bb049f_1121354365.png
 				tex_coord_set 0
 				colour_op modulate
@@ -276,10 +276,10 @@
 			texture_unit
 			{
-				texture D:\Profiles\giegl\My Documents\maya\projects\default\sourceimages\_12bb049l_1121354365.png
-				tex_coord_set 0
-				colour_op modulate
-			}
-		}
-	}
-}
-
+				texture _12bb049l_1121354365.png
+				tex_coord_set 0
+				colour_op modulate
+			}
+		}
+	}
+}
+
Index: trunk/VUT/Ogre/resources/overlays/VisibilityDemo.overlay
===================================================================
--- trunk/VUT/Ogre/resources/overlays/VisibilityDemo.overlay	(revision 183)
+++ trunk/VUT/Ogre/resources/overlays/VisibilityDemo.overlay	(revision 254)
@@ -333,4 +333,11 @@
 			caption [F9] Start / End animation
 		}
+		element TextArea(Example/Visibility/Help/Video): Example/Visibility/Templates/BasicText
+		{
+			left 5
+			width 180
+			height 30
+			caption [F10] Write out video (i.e., one image per frame)
+		}
 		element TextArea(Example/Visibility/Help/Screenshots): Example/Visibility/Templates/BasicText
 		{
Index: trunk/VUT/Ogre/resources/VisibilityDemo.overlay
===================================================================
--- trunk/VUT/Ogre/resources/VisibilityDemo.overlay	(revision 161)
+++ 	(revision )
@@ -1,642 +1,0 @@
-template element TextArea(Example/Visibility/Templates/BasicText)
-{
-	metrics_mode pixels
-	left 5
-	top 5
-	width 180
-	height 30
-	font_name TrebuchetMSBold
-	char_height 16
-	colour_top 0.5 0.7 0.5
-	colour_bottom 0.3 0.5 0.3
-}
-
-Example/Visibility/CullStatsOverlay
-{
-	zorder 500
-	// Stats block
-	container BorderPanel(Example/Visibility/VisibilityPanel)
-	{
-		metrics_mode pixels
-		vert_align top
-		left 5 
-		top 5
-		width 430
-		height 90
-		material Core/StatsBlockCenter
-        	border_size 1 1 1 1
-        	border_material Core/StatsBlockBorder
-        	border_topleft_uv     0.0000 1.0000 0.0039 0.9961
-	    	border_top_uv         0.0039 1.0000 0.9961 0.9961
-	    	border_topright_uv    0.9961 1.0000 1.0000 0.9961
-	    	border_left_uv        0.0000 0.9961 0.0039 0.0039
-	    	border_right_uv       0.9961 0.9961 1.0000 0.0039
-	    	border_bottomleft_uv  0.0000 0.0039 0.0039 0.0000
-        	border_bottom_uv      0.0039 0.0039 0.9961 0.0000
-	    	border_bottomright_uv 0.9961 0.0039 1.0000 0.0000
-
-
-		element TextArea(Example/Visibility/Algorithm): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			caption [SPACE] Algorithm
-		}
-		element TextArea(Example/Visibility/AlgorithmInfo): Example/Visibility/Templates/BasicText
-		{
-			left 210
-			width 120
-			height 30
-			caption :
-		}
-
-		element TextArea(Example/Visibility/Threshold): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 120
-			height 30
-			caption [-][+] Threshold
-		}
-		element TextArea(Example/Visibility/ThresholdInfo): Example/Visibility/Templates/BasicText
-		{
-			left 210
-			width 120
-			height 30
-			caption :
-		}
-		element TextArea(Example/Visibility/TestGeometryForVisibleLeaves): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 120
-			height 30
-			caption [G] Test Geometry For Leaves
-		}
-		element TextArea(Example/Visibility/TestGeometryForVisibleLeavesInfo): Example/Visibility/Templates/BasicText
-		{
-			left 210
-			width 120
-			height 30
-			caption :
-		}
-		element TextArea(Example/Visibility/UseDepthPass): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 120
-			height 30
-			caption [X] Depth pass
-		}
-		element TextArea(Example/Visibility/UseDepthPassInfo): Example/Visibility/Templates/BasicText
-		{
-			left 210
-			width 120
-			height 30
-			caption :
-		}
-		element TextArea(Example/Visibility/AssumedVisibility): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 120
-			height 30
-			caption [8][9] Assumed Visibility
-		}
-		
-		element TextArea(Example/Visibility/AssumedVisibilityInfo): Example/Visibility/Templates/BasicText
-		{
-			left 210
-			width 120
-			height 30
-			caption :
-		}
-		element TextArea(Example/Visibility/CurrentObjectType): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 120
-			height 30
-			caption [F7] Object type
-		}	
-		element TextArea(Example/Visibility/CurrentObjectTypeInfo): Example/Visibility/Templates/BasicText
-		{
-			left 210
-			width 90
-			font_name TrebuchetMSBold
-			caption :			
-		}	
-	}
-
-	container BorderPanel(Example/Visibility/VisibilityStatsPanel)
-	{
-		metrics_mode pixels
-		vert_align top
-		horz_align right
-		left -250 
-		top 5
-		width 320
-		height 135
-		material Core/StatsBlockCenter
-        	border_size 1 1 1 1
-        	border_material Core/StatsBlockBorder
-        	border_topleft_uv     0.0000 1.0000 0.0039 0.9961
-	    	border_top_uv         0.0039 1.0000 0.9961 0.9961
-	    	border_topright_uv    0.9961 1.0000 1.0000 0.9961
-	    	border_left_uv        0.0000 0.9961 0.0039 0.0039
-	    	border_right_uv       0.9961 0.9961 1.0000 0.0039
-	    	border_bottomleft_uv  0.0000 0.0039 0.0039 0.0000
-        	border_bottom_uv      0.0039 0.0039 0.9961 0.0000
-	    	border_bottomright_uv 0.9961 0.0039 1.0000 0.0000
-
-		element TextArea(Example/Visibility/FrustumCulledNodes): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption Frustum Culled Nodes
-		}
-		element TextArea(Example/Visibility/FrustumCulledNodesInfo): Example/Visibility/Templates/BasicText
-		{
-			left 180
-			width 90
-			height 30
-			caption :
-		}
-		element TextArea(Example/Visibility/QueryCulledNodes): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption Query Culled Nodes
-		}	
-		element TextArea(Example/Visibility/QueryCulledNodesInfo): Example/Visibility/Templates/BasicText
-		{
-			left 180
-			width 90
-			height 30
-			caption :
-		}
-		element TextArea(Example/Visibility/TraversedNodes): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption Traversed Nodes
-		}	
-		element TextArea(Example/Visibility/TraversedNodesInfo): Example/Visibility/Templates/BasicText
-		{
-			left 180
-			width 90
-			height 30
-			caption :
-		}
-		element TextArea(Example/Visibility/HierarchyNodes): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption Hierarchy Nodes
-		}	
-		element TextArea(Example/Visibility/HierarchyNodesInfo): Example/Visibility/Templates/BasicText
-		{
-			left 180
-			width 90
-			height 30
-			caption :
-		}
-		element TextArea(Example/Visibility/RenderedNodes): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption Rendered Nodes
-		}	
-		element TextArea(Example/Visibility/RenderedNodesInfo): Example/Visibility/Templates/BasicText
-		{
-			left 180
-			width 90
-			height 30
-			caption :
-		}
-		element TextArea(Example/Visibility/ObjectsCount): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption Number of objects
-		}	
-		element TextArea(Example/Visibility/ObjectsCountInfo): Example/Visibility/Templates/BasicText
-		{
-			left 180
-			width 90
-			height 30
-			caption :
-		}
-		element TextArea(Example/Visibility/QueriesIssued): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption Queries issued
-		}	
-		element TextArea(Example/Visibility/QueriesIssuedInfo): Example/Visibility/Templates/BasicText
-		{
-			left 180
-			width 90
-			font_name TrebuchetMSBold
-			caption :			
-		}
-		
-	}
-}
-
-
-Example/Visibility/HelpOverlay
-{
-	zorder 600
-	// Stats block
-	container BorderPanel(Example/Visibility/Help/HelpPanel)
-	{
-		metrics_mode pixels
-		horz_align left
-		vert_align top
-		width 600
-		height 300
-		left 200
-		top 200
-		material Core/StatsBlockCenter
-		//material Example/Visibility/Helpscreen
-        	border_size 1 1 1 1
-        	border_material Core/StatsBlockBorder
-        	border_topleft_uv     0.0000 1.0000 0.0039 0.9961
-	    	border_top_uv         0.0039 1.0000 0.9961 0.9961
-	    	border_topright_uv    0.9961 1.0000 1.0000 0.9961
-	    	border_left_uv        0.0000 0.9961 0.0039 0.0039
-	    	border_right_uv       0.9961 0.9961 1.0000 0.0039
-	    	border_bottomleft_uv  0.0000 0.0039 0.0039 0.0000
-        	border_bottom_uv      0.0039 0.0039 0.9961 0.0000
-	    	border_bottomright_uv 0.9961 0.0039 1.0000 0.0000
-
-		container Panel(Example/Visibility/Help/BreakPanel)
-		{
-			metrics_mode pixels
-			left 5 
-			top 22
-			width 590
-			height 1
-			material Core/StatsBreak
-		}
-
-		element TextArea(Example/Visibility/Help/HelpOptions)
-		{
-			metrics_mode pixels
-			left 5
-			top 5
-			width 90
-			height 30
-			font_name TrebuchetMSBold
-			char_height 19
-			caption Help: Additional Options
-			colour_top 1 1 0.7
-			colour_bottom 1 1 0.7
-		}
-
-		element TextArea(Example/Visibility/Help/ShowHelp): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption [F1] Show / Hide this screen
-		}
-		element TextArea(Example/Visibility/Help/Stats): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption [F2] Show / Hide stats
-		}
-		element TextArea(Example/Visibility/Help/AppState): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption [F3] Toggle between interactive / recorded walkthrough
-		}
-		element TextArea(Example/Visibility/Help/Recorded): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption [F4] Start / End frame recording
-		}
-		element TextArea(Example/Visibility/Help/Animation): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption [F9] Start / End animation
-		}
-		element TextArea(Example/Visibility/Help/Screenshots): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption [F11] Screenshot
-		}
-		element TextArea(Example/Visibility/Help/WriteOut): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption [F12] Write scene entities to file
-		}
-		
-		//-- visualization
-		element TextArea(Example/Visibility/Help/VizSection): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption ****** Visualization ******
-		}
-		element TextArea(Example/Visibility/Help/Viz): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption [1] Show / hide visualization
-		}
-		element TextArea(Example/Visibility/Help/NextVizMode): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 175
-			height 30
-			caption [2] Toggle visualization mode
-		}
-		element TextArea(Example/Visibility/Help/ZoomViz): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 190
-			height 30
-			caption [3][4] Zoom in / out of visualization
-		}
-		element TextArea(Example/Visibility/Help/SceneDetail): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption [R] Toggle between solid / wireframe / point based rendering
-		}
-		element TextArea(Example/Visibility/Help/DisplayCameraDetails): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption [P] Show / hide camera details 
-		}
-		element TextArea(Example/Visibility/Help/DisplayOctree): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption [T] Show / hide octree 
-		}
-		element TextArea(Example/Visibility/Help/UseShadows): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption [S] Show / hide shadows
-		}
-		element TextArea(Example/Visibility/Help/Filter): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption [F] toggle filtering method (trilinear, anisotropic, bilinear)
-		}
-		element TextArea(Example/Visibility/Help/VisQuery): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption ****** Visibility Queries ******
-		}
-		element TextArea(Example/Visibility/Help/FromCameraQuery): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption [F5] From camera visible pixels (+ SHIFT: relative visibility)
-		}
-		element TextArea(Example/Visibility/Help/FromPointQuery): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption [F6] From camera visible pixels (+ SHIFT: relative visibility)
-		}
-		element TextArea(Example/Visibility/Help/QueryType): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption [I] Change between occlusion query / item buffer visibility query
-		}
-		element TextArea(Example/Visibility/Help/QueryTarget): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption [C] Mesh / Patch visibility (only item buffer)
-		}
-		element TextArea(Example/Visibility/Help/SceneObjects): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption ******* Generation / Destruction of scene objects ******
-		}
-		element TextArea(Example/Visibility/Help/GenerateObjects): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption [F8] Generate 500 objects
-		}
-		element TextArea(Example/Visibility/Help/RemoveObjects): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption [DEL] Remove generated objects 
-		}
-		element TextArea(Example/Visibility/Help/DropObject): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 180
-			height 30
-			caption [MOUSE LEFT] Drop object on terrain
-		}
-	}
-}
-
-Example/Visibility/QueryOverlay
-{
-	zorder 650
-	// Stats block
-	container BorderPanel(Example/Visibility/Query/QueryPanel)
-	{
-		metrics_mode pixels
-		horz_align left
-		vert_align top
-		width 600
-		height 145
-		left 200
-		top 300
-		material Core/StatsBlockCenter
-		
-        	border_size 1 1 1 1
-        	border_material Core/StatsBlockBorder
-        	border_topleft_uv     0.0000 1.0000 0.0039 0.9961
-	    	border_top_uv         0.0039 1.0000 0.9961 0.9961
-	    	border_topright_uv    0.9961 1.0000 1.0000 0.9961
-	    	border_left_uv        0.0000 0.9961 0.0039 0.0039
-	    	border_right_uv       0.9961 0.9961 1.0000 0.0039
-	    	border_bottomleft_uv  0.0000 0.0039 0.0039 0.0000
-        	border_bottom_uv      0.0039 0.0039 0.9961 0.0000
-	    	border_bottomright_uv 0.9961 0.0039 1.0000 0.0000
-
-		container Panel(Example/Visibility/Query/BreakPanel)
-		{
-			metrics_mode pixels
-			left 5 
-			top 22
-			width 590
-			height 1
-			material Core/StatsBreak
-		}
-
-		element TextArea(Example/Visibility/Query/Headline)
-		{
-			metrics_mode pixels
-			left 5
-			top 5
-			width 90
-			height 30
-			font_name TrebuchetMSBold
-			char_height 19
-			caption Exact Visibility Query
-			colour_top 1 1 0.7
-			colour_bottom 1 1 0.7
-		}
-
-		element TextArea(Example/Visibility/Query/QueryType): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 90
-			height 30
-			caption Type
-		}
-		
-		
-		element TextArea(Example/Visibility/Query/QueryTypeInfo): Example/Visibility/Templates/BasicText
-		{
-			left 180
-			width 90
-			height 30
-			caption :
-		}
-
-		element TextArea(Example/Visibility/Query/VisibleNodes): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 90
-			height 30
-			caption Visible nodes
-		}
-		element TextArea(Example/Visibility/Query/VisibleNodesInfo): Example/Visibility/Templates/BasicText
-		{
-			left 180
-			width 90
-			height 30
-			caption :
-		}
-
-		element TextArea(Example/Visibility/Query/VisibleGeometry): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 90
-			height 30
-			caption Visible geometry
-		}
-		element TextArea(Example/Visibility/Query/VisibleGeometryInfo): Example/Visibility/Templates/BasicText
-		{
-			left 180
-			width 90
-			height 30
-			caption :
-		}
-
-
-		element TextArea(Example/Visibility/Query/VisiblePatches): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 90
-			height 30
-			caption Visible patches
-		}
-		element TextArea(Example/Visibility/Query/VisiblePatchesInfo): Example/Visibility/Templates/BasicText
-		{
-			left 180
-			width 90
-			height 30
-			caption :
-		}
-
-		element TextArea(Example/Visibility/Query/NodeVisibility): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 90
-			height 30
-			caption Avg. node visibility
-		}
-
-		element TextArea(Example/Visibility/Query/NodeVisibilityInfo): Example/Visibility/Templates/BasicText
-		{
-			left 180
-			width 90
-			height 30
-			caption :
-		}
-
-		element TextArea(Example/Visibility/Query/GeometryVisibility): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 90
-			height 30
-			caption Avg. geometry visibility
-		}
-
-		element TextArea(Example/Visibility/Query/GeometryVisibilityInfo): Example/Visibility/Templates/BasicText
-		{
-			left 180
-			width 90
-			height 30
-			caption :
-		}
-		element TextArea(Example/Visibility/Query/PatchVisibility): Example/Visibility/Templates/BasicText
-		{
-			left 5
-			width 90
-			height 30
-			caption Avg. patch visibility
-		}
-
-		element TextArea(Example/Visibility/Query/PatchVisibilityInfo): Example/Visibility/Templates/BasicText
-		{
-			left 180
-			width 90
-			height 30
-			caption :
-		}
-			
-
-	}
-}
