OGL: Recreate the framebuffers when the stereo setting changes.
This commit is contained in:
parent
63b37e29d1
commit
284be96cd5
|
@ -89,6 +89,8 @@ static RasterFont* s_pfont = nullptr;
|
||||||
static int s_MSAASamples = 1;
|
static int s_MSAASamples = 1;
|
||||||
static int s_LastMultisampleMode = 0;
|
static int s_LastMultisampleMode = 0;
|
||||||
|
|
||||||
|
static bool s_LastStereo = false;
|
||||||
|
|
||||||
static u32 s_blendMode;
|
static u32 s_blendMode;
|
||||||
|
|
||||||
static bool s_vsync;
|
static bool s_vsync;
|
||||||
|
@ -591,6 +593,7 @@ Renderer::Renderer()
|
||||||
s_LastMultisampleMode = g_ActiveConfig.iMultisampleMode;
|
s_LastMultisampleMode = g_ActiveConfig.iMultisampleMode;
|
||||||
s_MSAASamples = GetNumMSAASamples(s_LastMultisampleMode);
|
s_MSAASamples = GetNumMSAASamples(s_LastMultisampleMode);
|
||||||
ApplySSAASettings();
|
ApplySSAASettings();
|
||||||
|
s_LastStereo = g_ActiveConfig.bStereo;
|
||||||
|
|
||||||
// Decide framebuffer size
|
// Decide framebuffer size
|
||||||
s_backbuffer_width = (int)GLInterface->GetBackBufferWidth();
|
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;
|
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);
|
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_LastMultisampleMode = g_ActiveConfig.iMultisampleMode;
|
||||||
s_MSAASamples = GetNumMSAASamples(s_LastMultisampleMode);
|
s_MSAASamples = GetNumMSAASamples(s_LastMultisampleMode);
|
||||||
ApplySSAASettings();
|
ApplySSAASettings();
|
||||||
|
s_LastStereo = g_ActiveConfig.bStereo;
|
||||||
|
|
||||||
delete g_framebuffer_manager;
|
delete g_framebuffer_manager;
|
||||||
g_framebuffer_manager = new FramebufferManager(s_target_width, s_target_height,
|
g_framebuffer_manager = new FramebufferManager(s_target_width, s_target_height,
|
||||||
|
|
Loading…
Reference in New Issue