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
This commit is contained in:
Benoit Bolsee 2015-04-11 16:07:45 +02:00 committed by Thomas Szepe
parent a6421e1291
commit b329016b29
Notes: blender-bot 2023-05-03 10:14:48 +02:00
Referenced by issue #43537, ImageMirror doesn't work in BlenderPlayer with quadbuffered
1 changed files with 6 additions and 0 deletions

View File

@ -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);