Index: trunk/VUT/Ogre/include/OgreVisibilitySceneManager.h
===================================================================
--- trunk/VUT/Ogre/include/OgreVisibilitySceneManager.h	(revision 87)
+++ trunk/VUT/Ogre/include/OgreVisibilitySceneManager.h	(revision 99)
@@ -56,5 +56,5 @@
 	SceneNodeHierarchyInterface *mHierarchyInterface;
 	GtpVisibility::VisibilityManager *mVisibilityManager;
-	bool mUseCulling;
+	bool mUseVisibilityCulling;
 };
 } // namespace Ogre
Index: trunk/VUT/Ogre/include/OgreVisibilityOctreeSceneManager.h
===================================================================
--- trunk/VUT/Ogre/include/OgreVisibilityOctreeSceneManager.h	(revision 93)
+++ trunk/VUT/Ogre/include/OgreVisibilityOctreeSceneManager.h	(revision 99)
@@ -50,5 +50,5 @@
 	GtpVisibility::VisibilityManager *getVisibilityManager( void );
 
-	//writes out statis into the Ogre log file
+	//writes out stats into the Ogre log file
 	void WriteLog();
 
@@ -57,5 +57,5 @@
 	OctreeHierarchyInterface *mHierarchyInterface;
 	GtpVisibility::VisibilityManager *mVisibilityManager;
-	bool mUseCulling;
+	bool mUseVisibilityCulling;
 };
 
Index: trunk/VUT/Ogre/include/OgreVisibilityTerrainSceneManager.h
===================================================================
--- trunk/VUT/Ogre/include/OgreVisibilityTerrainSceneManager.h	(revision 93)
+++ trunk/VUT/Ogre/include/OgreVisibilityTerrainSceneManager.h	(revision 99)
@@ -53,12 +53,15 @@
 	GtpVisibility::VisibilityManager *getVisibilityManager();
 	
-	//writes out statis into the Ogre log file
+	//writes out stats into the Ogre log file
 	void WriteLog();
-
+	void SetShowVisualization(bool showViz);
+	
 protected:
 	
 	OctreeHierarchyInterface *mHierarchyInterface;
 	GtpVisibility::VisibilityManager *mVisibilityManager;
-	bool mUseCulling;
+
+	bool mUseVisibilityCulling;
+	bool mShowVisualization;
 };
 
Index: trunk/VUT/Ogre/src/OgreVisibilityOctreeSceneManager.cpp
===================================================================
--- trunk/VUT/Ogre/src/OgreVisibilityOctreeSceneManager.cpp	(revision 96)
+++ trunk/VUT/Ogre/src/OgreVisibilityOctreeSceneManager.cpp	(revision 99)
@@ -12,5 +12,5 @@
 VisibilityOctreeSceneManager::VisibilityOctreeSceneManager(
 	GtpVisibility::VisibilityManager *visManager)
-: mVisibilityManager(visManager), mUseCulling(true)
+: mVisibilityManager(visManager), mUseVisibilityCulling(true)
 {
 	mHierarchyInterface = 
@@ -38,5 +38,5 @@
 
 	// standard scenemanager rendering without hierarchical culling
-	if(!mUseCulling)
+	if(!mUseVisibilityCulling)
 	{	
 		OctreeSceneManager::_renderVisibleObjects();
@@ -76,14 +76,17 @@
 	SceneManager::_renderVisibleObjects();
 
-	// write out stats
-	WriteLog();
+	//WriteLog(); // write out stats
 }
 //-----------------------------------------------------------------------
 void VisibilityOctreeSceneManager::_findVisibleObjects(Camera* cam, bool onlyShadowCasters)
 {
-	// empty if hierarchical culling is used =>
+	// does nothing if hierarchical culling is used =>
 	// we interleave identification and rendering of objects 
 	// in _renderVisibibleObjects 
-	if(!mUseCulling)
+	getRenderQueue()->clear();
+    mBoxes.clear();
+    mVisible.clear();
+
+	if(!mUseVisibilityCulling)
 	{
 		OctreeSceneManager::_findVisibleObjects(cam, onlyShadowCasters);
@@ -104,10 +107,10 @@
 bool VisibilityOctreeSceneManager::setOption(const String & key, const void * val)
 {
-	if (key == "UseCulling")
+	if (key == "UseVisibilityCulling")
 	{
-		mUseCulling = (*static_cast<const bool *>(val));
+		mUseVisibilityCulling = (*static_cast<const bool *>(val));
 		return true;
 	}
-
+	
 	return VisibilityOptionsManager(mVisibilityManager, mHierarchyInterface).
 		setOption(key, val) || OctreeSceneManager::setOption(key, val);
Index: trunk/VUT/Ogre/src/OgreVisibilityTerrainSceneManager.cpp
===================================================================
--- trunk/VUT/Ogre/src/OgreVisibilityTerrainSceneManager.cpp	(revision 96)
+++ trunk/VUT/Ogre/src/OgreVisibilityTerrainSceneManager.cpp	(revision 99)
@@ -15,5 +15,6 @@
 VisibilityTerrainSceneManager::VisibilityTerrainSceneManager(
 	GtpVisibility::VisibilityManager *visManager)
-: mVisibilityManager(visManager), mUseCulling(true)
+: mVisibilityManager(visManager), mUseVisibilityCulling(true),
+mShowVisualization(false)
 {
 	mHierarchyInterface = 
@@ -38,5 +39,5 @@
 	
 	// standard scenemanager rendering without hierarchical culling
-	if(!mUseCulling)
+	if(!mUseVisibilityCulling || mShowVisualization)
 	{	
 		OctreeSceneManager::_renderVisibleObjects();
@@ -74,12 +75,26 @@
 	clearSpecialCaseRenderQueues();
 	SceneManager::_renderVisibleObjects();
+
+	//WriteLog(); // write out stats
 }
 //-----------------------------------------------------------------------
 void VisibilityTerrainSceneManager::_findVisibleObjects(Camera* cam, bool onlyShadowCasters)
 {
-	// empty if hierarchical culling is used =>
+	// does nothing if hierarchical culling is used =>
 	// we interleave identification and rendering of objects 
 	// in _renderVisibibleObjects 
-	if(!mUseCulling)
+	if (mShowVisualization)
+    {
+		for ( BoxList::iterator it = mBoxes.begin(); it != mBoxes.end(); ++it )
+		{
+			getRenderQueue()->addRenderable(*it);
+		}
+	}
+
+	getRenderQueue()->clear();
+    mBoxes.clear();
+    mVisible.clear();
+
+	if(!mUseVisibilityCulling)
 	{
 		OctreeSceneManager::_findVisibleObjects(cam, onlyShadowCasters);
@@ -101,7 +116,12 @@
 bool VisibilityTerrainSceneManager::setOption(const String & key, const void * val)
 {
-	if (key == "UseCulling")
+	if (key == "UseVisibilityCulling")
 	{
-		mUseCulling = (*static_cast<const bool *>(val));
+		mUseVisibilityCulling = (*static_cast<const bool *>(val));
+		return true;
+	}
+	if (key == "ShowVisualization")
+	{
+		mShowVisualization = (*static_cast<const bool *>(val));
 		return true;
 	}
@@ -119,4 +139,5 @@
 	}
 	
+
 	return VisibilityOptionsManager(mVisibilityManager, mHierarchyInterface).
 		getOption(key, val) && TerrainSceneManager::getOption(key, val);
@@ -144,4 +165,9 @@
 }
 //-----------------------------------------------------------------------
+void VisibilityTerrainSceneManager::SetShowVisualization(bool showViz)
+{
+	mShowVisualization = showViz;
+}
+//-----------------------------------------------------------------------
 void VisibilityTerrainSceneManager::WriteLog()
 {
Index: trunk/VUT/Ogre/src/OgreVisibilitySceneManager.cpp
===================================================================
--- trunk/VUT/Ogre/src/OgreVisibilitySceneManager.cpp	(revision 96)
+++ trunk/VUT/Ogre/src/OgreVisibilitySceneManager.cpp	(revision 99)
@@ -12,5 +12,5 @@
 //-----------------------------------------------------------------------
 VisibilitySceneManager::VisibilitySceneManager(GtpVisibility::VisibilityManager *visManager)
-:mVisibilityManager(visManager), mUseCulling(true)
+:mVisibilityManager(visManager), mUseVisibilityCulling(true)
 {
 	mHierarchyInterface = new SceneNodeHierarchyInterface(this, mDestRenderSystem);
@@ -27,5 +27,5 @@
 	// we interleave identification and rendering of objects 
 	// in _renderVisibibleObjects 
-	if(!mUseCulling)
+	if(!mUseVisibilityCulling)
 	{
 		SceneManager::_findVisibleObjects(cam, onlyShadowCasters);
@@ -38,5 +38,5 @@
 	mVisibilityManager->GetCullingManager()->InitFrame();
 
-	if(!mUseCulling)
+	if(!mUseVisibilityCulling)
 	{	
 		SceneManager::_renderVisibleObjects();
