From 70c63ce6cfc566877ff3ade5906184fce879ef91 Mon Sep 17 00:00:00 2001 From: degasus Date: Fri, 28 Dec 2012 14:24:12 +0100 Subject: [PATCH] fix dual pass alpha --- Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp b/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp index fe5f1d976a..d1d2e44a64 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp @@ -220,12 +220,13 @@ void VertexManager::vFlush() if (useDstAlpha && !dualSourcePossible) { ps = PixelShaderCache::SetShader(DSTALPHA_ALPHA_PASS,g_nativeVertexFmt->m_components); - if(ps) - ProgramShaderCache::SetBothShaders(ps->glprogid, 0); + if(ps && vs) + ProgramShaderCache::SetBothShaders(ps->glprogid, vs->glprogid); if (!g_ActiveConfig.backend_info.bSupportsGLSLUBO) + { PixelShaderManager::SetConstants(); // Need to set these again, if we don't support UBO - if (g_nativeVertexFmt) - g_nativeVertexFmt->SetupVertexPointers(); + VertexShaderManager::SetConstants(); + } // only update alpha glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_TRUE);