summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorJules Blok <jules.blok@gmail.com>2014-10-29 15:42:37 +0100
committerJules Blok <jules.blok@gmail.com>2014-11-23 14:26:56 +0100
commit284be96cd58a231785f434e7fcff956184d7192f (patch)
tree0cf66b8c579ea81b122953c29cf17e63ca9402bb /Source/Core
parent63b37e29d1c5ea6ecb2342ef9ba01b165aac602e (diff)
OGL: Recreate the framebuffers when the stereo setting changes.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/VideoBackends/OGL/Render.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp
index 802a1b1f96..1a0b7e5708 100644
--- a/Source/Core/VideoBackends/OGL/Render.cpp
+++ b/Source/Core/VideoBackends/OGL/Render.cpp
@@ -89,6 +89,8 @@ static RasterFont* s_pfont = nullptr;
static int s_MSAASamples = 1;
static int s_LastMultisampleMode = 0;
+static bool s_LastStereo = false;
+
static u32 s_blendMode;
static bool s_vsync;
@@ -591,6 +593,7 @@ Renderer::Renderer()
s_LastMultisampleMode = g_ActiveConfig.iMultisampleMode;
s_MSAASamples = GetNumMSAASamples(s_LastMultisampleMode);
ApplySSAASettings();
+ s_LastStereo = g_ActiveConfig.bStereo;
// Decide framebuffer size
s_backbuffer_width = (int)GLInterface->GetBackBufferWidth();
@@ -1690,15 +1693,16 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co
s_LastEFBScale = g_ActiveConfig.iEFBScale;
}
- if (xfbchanged || WindowResized || (s_LastMultisampleMode != g_ActiveConfig.iMultisampleMode))
+ if (xfbchanged || WindowResized || (s_LastMultisampleMode != g_ActiveConfig.iMultisampleMode) || (s_LastStereo != g_ActiveConfig.bStereo))
{
UpdateDrawRectangle(s_backbuffer_width, s_backbuffer_height);
- if (CalculateTargetSize(s_backbuffer_width, s_backbuffer_height) || s_LastMultisampleMode != g_ActiveConfig.iMultisampleMode)
+ if (CalculateTargetSize(s_backbuffer_width, s_backbuffer_height) || s_LastMultisampleMode != g_ActiveConfig.iMultisampleMode || s_LastStereo != g_ActiveConfig.bStereo)
{
s_LastMultisampleMode = g_ActiveConfig.iMultisampleMode;
s_MSAASamples = GetNumMSAASamples(s_LastMultisampleMode);
ApplySSAASettings();
+ s_LastStereo = g_ActiveConfig.bStereo;
delete g_framebuffer_manager;
g_framebuffer_manager = new FramebufferManager(s_target_width, s_target_height,