Avoid overriding vr eye-specific buffer binding during 2D rendering.

This commit is contained in:
Christopher Bruns 2018-08-19 15:23:03 -07:00 committed by Christoph Oelckers
parent fad406c4c9
commit 03fa1a12cb

View file

@ -50,6 +50,7 @@
#include "gl/renderer/gl_renderbuffers.h" #include "gl/renderer/gl_renderbuffers.h"
#include "gl/data/gl_vertexbuffer.h" #include "gl/data/gl_vertexbuffer.h"
#include "gl/scene/gl_drawinfo.h" #include "gl/scene/gl_drawinfo.h"
#include "hwrenderer/utility/hw_vrmodes.h"
#include "hwrenderer/postprocessing/hw_presentshader.h" #include "hwrenderer/postprocessing/hw_presentshader.h"
#include "hwrenderer/postprocessing/hw_present3dRowshader.h" #include "hwrenderer/postprocessing/hw_present3dRowshader.h"
#include "hwrenderer/postprocessing/hw_shadowmapshader.h" #include "hwrenderer/postprocessing/hw_shadowmapshader.h"
@ -422,7 +423,8 @@ void FGLRenderer::Draw2D(F2DDrawer *drawer)
{ {
twoD.Clock(); twoD.Clock();
FGLDebug::PushGroup("Draw2D"); FGLDebug::PushGroup("Draw2D");
mBuffers->BindCurrentFB(); if (VRMode::GetVRMode(true)->mEyeCount == 1)
mBuffers->BindCurrentFB();
const auto &mScreenViewport = screen->mScreenViewport; const auto &mScreenViewport = screen->mScreenViewport;
glViewport(mScreenViewport.left, mScreenViewport.top, mScreenViewport.width, mScreenViewport.height); glViewport(mScreenViewport.left, mScreenViewport.top, mScreenViewport.width, mScreenViewport.height);