mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
PostProcessing: Invalidate shader when anaglyph stereoscopy is toggled.
This commit is contained in:
parent
f3ddf37d07
commit
9994ccb342
@ -38,6 +38,7 @@ static char s_vertex_shader[] =
|
||||
|
||||
OpenGLPostProcessing::OpenGLPostProcessing()
|
||||
: m_initialized(false)
|
||||
, m_anaglyph(false)
|
||||
{
|
||||
CreateHeader();
|
||||
|
||||
@ -160,7 +161,8 @@ void OpenGLPostProcessing::BlitFromTexture(TargetRectangle src, TargetRectangle
|
||||
void OpenGLPostProcessing::ApplyShader()
|
||||
{
|
||||
// shader didn't changed
|
||||
if (m_initialized && m_config.GetShader() == g_ActiveConfig.sPostProcessingShader)
|
||||
if (m_initialized && m_config.GetShader() == g_ActiveConfig.sPostProcessingShader &&
|
||||
((g_ActiveConfig.iStereoMode == STEREO_ANAGLYPH) == m_anaglyph))
|
||||
return;
|
||||
|
||||
m_shader.Destroy();
|
||||
@ -222,6 +224,7 @@ void OpenGLPostProcessing::ApplyShader()
|
||||
std::string glsl_name = "option_" + it.first;
|
||||
m_uniform_bindings[it.first] = glGetUniformLocation(m_shader.glprogid, glsl_name.c_str());
|
||||
}
|
||||
m_anaglyph = g_ActiveConfig.iStereoMode == STEREO_ANAGLYPH;
|
||||
m_initialized = true;
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,7 @@ public:
|
||||
|
||||
private:
|
||||
bool m_initialized;
|
||||
bool m_anaglyph;
|
||||
SHADER m_shader;
|
||||
GLuint m_uniform_resolution;
|
||||
GLuint m_uniform_src_rect;
|
||||
|
Loading…
x
Reference in New Issue
Block a user