Revision: 1719
          http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=1719&view=rev
Author:   rorlifter
Date:     2011-03-01 20:50:03 +0000 (Tue, 01 Mar 2011)

Log Message:
-----------
videocamera code update

Modified Paths:
--------------
    trunk/source/main/gfx/vidcam.cpp

Modified: trunk/source/main/gfx/vidcam.cpp
===================================================================
--- trunk/source/main/gfx/vidcam.cpp    2011-03-01 15:51:17 UTC (rev 1718)
+++ trunk/source/main/gfx/vidcam.cpp    2011-03-01 20:50:03 UTC (rev 1719)
@@ -94,6 +94,14 @@
        refx *= -1.0f;
        Quaternion rot = Quaternion(refx, refy, -normal); // rotate towards the 
cam direction
 
+       // add mirror reflectionangle by cam position
+       // cammode 1 = mirror
+       if (cammode != -1)
+       {
+               // flip the image left<>right to have a mirror and not a cam
+               
mat->getTechnique(0)->getPass(0)->getTextureUnitState(0)->setTextureUScale (-1);
+       }
+
        // set the new position / orientation to the camera
        mVidCam->setPosition(pos);
        mVidCam->setOrientation(rot * rotation); // add the user rotation to 
this


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

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Rigsofrods-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel

Reply via email to