OGL: Recreate the framebuffers when the stereo setting changes.

This commit is contained in:
Jules Blok 2014-10-29 15:42:37 +01:00
parent 63b37e29d1
commit 284be96cd5
1 changed files with 6 additions and 2 deletions

View File

@ -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,