Revision: 2557
          http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=2557&view=rev
Author:   ulteq
Date:     2012-05-14 12:25:24 +0000 (Mon, 14 May 2012)
Log Message:
-----------
-Fix: re-enabled the ability to change the render mode

Modified Paths:
--------------
    trunk/source/main/gfx/camera/CameraManager.cpp
    trunk/source/main/gfx/camera/CameraManager.h

Modified: trunk/source/main/gfx/camera/CameraManager.cpp
===================================================================
--- trunk/source/main/gfx/camera/CameraManager.cpp      2012-05-14 11:08:35 UTC 
(rev 2556)
+++ trunk/source/main/gfx/camera/CameraManager.cpp      2012-05-14 12:25:24 UTC 
(rev 2557)
@@ -133,6 +133,23 @@
                switchToNextBehavior();
        }
 
+       if ( INPUTENGINE.getEventBoolValueBounce(EV_COMMON_TOGGLE_RENDER_MODE, 
0.5f) )
+       {
+               mSceneDetailIndex = (mSceneDetailIndex + 1) % 3 ;
+               switch (mSceneDetailIndex)
+               {
+               case 0:
+                       ctx.mCamera->setPolygonMode(Ogre::PM_SOLID);
+                       break;
+               case 1:
+                       ctx.mCamera->setPolygonMode(Ogre::PM_WIREFRAME);
+                       break;
+               case 2:
+                       ctx.mCamera->setPolygonMode(Ogre::PM_POINTS);
+                       break;
+               }
+       }
+
        ctx.mCurrTruck  = BeamFactory::getSingleton().getCurrentTruck();
        ctx.mDt         = dt;
        ctx.mRotScale   = Degree(mRotScale);

Modified: trunk/source/main/gfx/camera/CameraManager.h
===================================================================
--- trunk/source/main/gfx/camera/CameraManager.h        2012-05-14 11:08:35 UTC 
(rev 2556)
+++ trunk/source/main/gfx/camera/CameraManager.h        2012-05-14 12:25:24 UTC 
(rev 2557)
@@ -71,6 +71,8 @@
 
        cameraContext_t ctx;
 
+       int mSceneDetailIndex;
+
        float mTransScale, mTransSpeed;
        float mRotScale, mRotateSpeed;
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Rigsofrods-devel mailing list
Rigsofrods-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel

Reply via email to