[Bf-blender-cvs] [b329016] master: BGE: FIX T43537: ImageMirror does not work in BlenderPlayer with quad buffer

Benoit Bolsee noreply at git.blender.org
Sat Apr 11 16:09:04 CEST 2015


Commit: b329016b29c3189e23bafebbe984008dae0d60a2
Author: Benoit Bolsee
Date:   Sat Apr 11 16:07:45 2015 +0200
Branches: master
https://developer.blender.org/rBb329016b29c3189e23bafebbe984008dae0d60a2

BGE: FIX T43537: ImageMirror does not work in BlenderPlayer with quad buffer

In quad-buffer stereo mode, the GE render pass ends with the right eye on the right buffer, but we need to draw on the left buffer to capture the render.

Reviewed By: agoose77, HG1

===================================================================

M	source/gameengine/VideoTexture/ImageRender.cpp

===================================================================

diff --git a/source/gameengine/VideoTexture/ImageRender.cpp b/source/gameengine/VideoTexture/ImageRender.cpp
index 9feb614..6a898ff 100644
--- a/source/gameengine/VideoTexture/ImageRender.cpp
+++ b/source/gameengine/VideoTexture/ImageRender.cpp
@@ -272,6 +272,12 @@ void ImageRender::Render()
 	// restore the stereo mode now that the matrix is computed
 	m_rasterizer->SetStereoMode(stereomode);
 
+    if (stereomode == RAS_IRasterizer::RAS_STEREO_QUADBUFFERED) {
+        // In QUAD buffer stereo mode, the GE render pass ends with the right eye on the right buffer
+        // but we need to draw on the left buffer to capture the render
+        // TODO: implement an explicit function in rasterizer to restore the left buffer.
+        m_rasterizer->SetEye(RAS_IRasterizer::RAS_STEREO_LEFTEYE);
+    }
 	m_scene->CalculateVisibleMeshes(m_rasterizer,m_camera);
 
 	m_scene->RenderBuckets(camtrans, m_rasterizer);




More information about the Bf-blender-cvs mailing list