Index: trunk/VUT/OcclusionCullingSceneManager/TestCulling/TestCulling.vcproj
===================================================================
--- trunk/VUT/OcclusionCullingSceneManager/TestCulling/TestCulling.vcproj	(revision 23)
+++ trunk/VUT/OcclusionCullingSceneManager/TestCulling/TestCulling.vcproj	(revision 29)
@@ -41,4 +41,5 @@
 				ProgramDatabaseFile="$(OutDir)/TestCulling.pdb"
 				SubSystem="2"
+				ImportLibrary=""
 				TargetMachine="1"/>
 			<Tool
Index: trunk/VUT/OcclusionCullingSceneManager/TestCulling/TestCullingApplication.cpp
===================================================================
--- trunk/VUT/OcclusionCullingSceneManager/TestCulling/TestCullingApplication.cpp	(revision 28)
+++ trunk/VUT/OcclusionCullingSceneManager/TestCulling/TestCullingApplication.cpp	(revision 29)
@@ -6,6 +6,6 @@
 */
 
-#pragma warning (push)
-#pragma warning( disable : 4267 )
+//#pragma warning (push)
+//#pragma warning( disable : 4267 )
 
 #include <OgreNoMemoryMacros.h>
@@ -15,5 +15,5 @@
 #include <../CEGUIRenderer/include/OgreCEGUITexture.h>
 #include <OgreMemoryMacros.h>
-#pragma warning (pop)
+//#pragma warning (pop)
 /*
 #include <CEGUI/CEGUIImageset.h>
@@ -39,4 +39,10 @@
 #include "windows.h"
 
+/***********************************************/
+/* TestCullingApplication implementation       */
+/***********************************************/
+
+
+//-----------------------------------------------------------------------
 void TestCullingApplication::createScene(void)
 {
@@ -67,7 +73,55 @@
      mGUISystem->setGUISheet(sheet);*/
 }
-
-
-/* MouseMotionListener callbacks */
+//-----------------------------------------------------------------------
+void TestCullingApplication::createFrameListener(void)
+{
+	mFrameListener= new MouseQueryListener(mWindow, mCamera, mSceneMgr, mGUIRenderer, mShipNode);
+	mFrameListener->showDebugOverlay(true);
+	mRoot->addFrameListener(mFrameListener);
+}
+//-----------------------------------------------------------------------
+void TestCullingApplication::chooseSceneManager(void)
+{
+    mSceneMgr = mRoot->getSceneManager(ST_GENERIC);
+}
+
+/***********************************************/
+/* MouseQueryListener implementation           */
+/***********************************************/
+
+//-----------------------------------------------------------------------
+MouseQueryListener::MouseQueryListener(RenderWindow* win, Camera* cam, SceneManager *sceneManager, CEGUI::Renderer *renderer,
+					   SceneNode* shipNode)
+        : ExampleFrameListener(win, cam, false, true), mGUIRenderer(renderer), mShipNode(shipNode)//,  mShutdownRequested(false)
+{
+
+		// Setup default variables
+        mCurrentObject = NULL;
+        mLMouseDown = false;
+        mRMouseDown = false;
+        mSceneMgr = sceneManager;
+
+        // Reduce move speed
+        mMoveSpeed = 50;
+        mRotateSpeed *= 2;
+	
+		mCurrentAlgorithm = OcclusionCullingSceneManager::RENDER_COHERENT;
+
+		// Register this so that we get mouse events.
+        mEventProcessor->addMouseListener(this);
+        mEventProcessor->addMouseMotionListener(this);
+		mEventProcessor->addKeyListener(this);
+
+		// show overlay
+        Overlay* pOver = OverlayManager::getSingleton().getByName("Example/OcclusionDemoOverlay");    
+        mAlgorithmInfo = OverlayManager::getSingleton().getOverlayElement("Example/Occlusion/OcclusionTechniqueInfo");
+        //mMaterialInfo = OverlayManager::getSingleton().getOverlayElement("Example/Shadows/MaterialInfo");
+        //mInfo = OverlayManager::getSingleton().getOverlayElement("Example/Shadows/Info");
+
+		mAlgorithmInfo->setCaption(": " + mCurrentAlgorithmCaptions[mCurrentAlgorithm]);
+        //mMaterialInfo->setCaption(": " + mAtheneMaterials[mCurrentAtheneMaterial]);
+        pOver->show();
+} // MouseQueryListener
+//-----------------------------------------------------------------------
 void MouseQueryListener::mouseMoved (MouseEvent *e)
 {
@@ -75,6 +129,5 @@
     CEGUI::System::getSingleton().injectMouseMove(e->getRelX() * mGUIRenderer->getWidth(), e->getRelY() * mGUIRenderer->getHeight());
 }
-
-
+//-----------------------------------------------------------------------
 void MouseQueryListener::mousePressed(MouseEvent* e)
 {
@@ -93,5 +146,5 @@
 } // mousePressed
 
- 
+ //-----------------------------------------------------------------------
 void MouseQueryListener::mouseReleased(MouseEvent* e)
 {
@@ -109,7 +162,5 @@
     } // else if
 } // mouseReleased
-
-
- // This is when the mouse is clicked, held and dragged.
+//-----------------------------------------------------------------------
 void MouseQueryListener::mouseDragged (MouseEvent *e)
  {
@@ -127,5 +178,22 @@
     } // else if
 } // mouseDragged
-
+//-----------------------------------------------------------------------
+bool MouseQueryListener::frameEnded(const FrameEvent& evt)
+{
+    if (timeDelay >= 0) 
+        timeDelay -= evt.timeSinceLastFrame;
+
+    KEY_PRESSED(KC_O, 1, changeAlgorithm());
+      
+    return ExampleFrameListener::frameStarted(evt) && ExampleFrameListener::frameEnded(evt);        
+}
+//-----------------------------------------------------------------------
+void MouseQueryListener::changeAlgorithm()
+{
+    mCurrentAlgorithm = ++mCurrentAlgorithm % OcclusionCullingSceneManager::NUM_RENDERMODES;
+    mAlgorithmInfo->setCaption(": " + mCurrentAlgorithmCaptions[mCurrentAlgorithm]);
+
+	mSceneMgr->setOption("Algorithm", &mCurrentAlgorithm);
+}
 
 INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT )
Index: trunk/VUT/OcclusionCullingSceneManager/TestCulling/TestCullingApplication.h
===================================================================
--- trunk/VUT/OcclusionCullingSceneManager/TestCulling/TestCullingApplication.h	(revision 28)
+++ trunk/VUT/OcclusionCullingSceneManager/TestCulling/TestCullingApplication.h	(revision 29)
@@ -17,5 +17,5 @@
 }
 
-String mAlgorithmTypeCaptions[OcclusionCullingSceneManager::NUM_RENDERMODES] = 
+String mCurrentAlgorithmCaptions[OcclusionCullingSceneManager::NUM_RENDERMODES] = 
 {
     "Cull Frustum", 
@@ -29,35 +29,6 @@
 
     MouseQueryListener(RenderWindow* win, Camera* cam, SceneManager *sceneManager, CEGUI::Renderer *renderer,
-					   SceneNode* shipNode)
-        : ExampleFrameListener(win, cam, false, true), mGUIRenderer(renderer), mShipNode(shipNode)//,  mShutdownRequested(false)
-    {
+					   SceneNode* shipNode);
 
-		// Setup default variables
-        mCurrentObject = NULL;
-        mLMouseDown = false;
-        mRMouseDown = false;
-        mSceneMgr = sceneManager;
-
-        // Reduce move speed
-        mMoveSpeed = 50;
-        mRotateSpeed *= 2;
-	
-		mAlgorithmType = OcclusionCullingSceneManager::RENDER_COHERENT;
-
-		// Register this so that we get mouse events.
-        mEventProcessor->addMouseListener(this);
-        mEventProcessor->addMouseMotionListener(this);
-		mEventProcessor->addKeyListener(this);
-
-		// show overlay
-        Overlay* pOver = OverlayManager::getSingleton().getByName("Example/ShadowsOverlay");    
-        mAlgorithmInfo = OverlayManager::getSingleton().getOverlayElement("Example/Shadows/ShadowTechniqueInfo");
-        //mMaterialInfo = OverlayManager::getSingleton().getOverlayElement("Example/Shadows/MaterialInfo");
-        //mInfo = OverlayManager::getSingleton().getOverlayElement("Example/Shadows/Info");
-
-		mAlgorithmInfo->setCaption("Algorithm: " + mAlgorithmTypeCaptions[mAlgorithmType]);
-        //mMaterialInfo->setCaption("Current: " + mAtheneMaterials[mCurrentAtheneMaterial]);
-        pOver->show();
-    } // MouseQueryListener
 
     ~MouseQueryListener( )
@@ -65,14 +36,5 @@
     }
 
-   bool frameEnded(const FrameEvent& evt)
-    {
-        if (timeDelay >= 0) 
-            timeDelay -= evt.timeSinceLastFrame;
-
-        KEY_PRESSED(KC_O, 1, changeAlgorithm());
-      
-        return ExampleFrameListener::frameStarted(evt) && ExampleFrameListener::frameEnded(evt);        
-    }
-
+	bool frameEnded(const FrameEvent& evt);
     /* MouseListener callbacks. */
     virtual void mouseClicked(MouseEvent* e) { }
@@ -125,9 +87,5 @@
     }
 */
-	 void changeAlgorithm()
-    {
-        mAlgorithmType = ++mAlgorithmType % OcclusionCullingSceneManager::NUM_RENDERMODES;
-        mAlgorithmInfo->setCaption("Algorithm: " + mAlgorithmTypeCaptions[mAlgorithmType]);
-    }
+	void changeAlgorithm();
 
 
@@ -139,5 +97,5 @@
 	SceneNode* mShipNode;
 //	bool mShutdownRequested;
-	int mAlgorithmType;
+	int mCurrentAlgorithm;
 	OverlayElement *mAlgorithmInfo;
 };
@@ -154,11 +112,5 @@
 protected:
 	void createScene(void);
-
-	void createFrameListener(void)
-    {
-		mFrameListener= new MouseQueryListener(mWindow, mCamera, mSceneMgr, mGUIRenderer, mShipNode);
-		mFrameListener->showDebugOverlay(true);
-		mRoot->addFrameListener(mFrameListener);
-    }
+	void createFrameListener(void);
 
 	CEGUI::OgreCEGUIRenderer *mGUIRenderer;
@@ -166,4 +118,6 @@
 
 private:
+	void chooseSceneManager(void);
+
 	Entity* mShip;
 	SceneNode* mShipNode;
@@ -189,8 +143,6 @@
     }*/
     // Override scene manager (use indoor instead of generic)
-    void chooseSceneManager(void)
-    {
-        mSceneMgr = mRoot->getSceneManager(ST_GENERIC);
-    }
+    
+
 	
 };
