From fee98b426b5a0c4d78042a2db3b352c4fe79ef56 Mon Sep 17 00:00:00 2001 From: NeoBrainX Date: Sat, 24 Mar 2012 04:47:28 +0100 Subject: Revert r41bcf657f89d, r3a9fed0ba285, r9adc119e3c2f and re58692653afd (all of them are wrong). --- Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp') diff --git a/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp b/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp index 5117f6ddb6..dff7f8299e 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp @@ -161,7 +161,7 @@ void VertexManager::vFlush() if (tentry) { // 0s are probably for no manual wrapping needed. - PixelShaderManager::SetTexDims(i, tentry->native_width, tentry->native_height, tentry->virtual_width, tentry->virtual_height, 0, 0, API_OPENGL); + PixelShaderManager::SetTexDims(i, tentry->native_width, tentry->native_height, 0, 0); if (g_ActiveConfig.iLog & CONF_SAVETEXTURES) { @@ -179,7 +179,7 @@ void VertexManager::vFlush() // set global constants VertexShaderManager::SetConstants(); - PixelShaderManager::SetConstants(API_OPENGL); + PixelShaderManager::SetConstants(); bool useDstAlpha = !g_ActiveConfig.bDstAlphaPass && bpmem.dstalpha.enable && bpmem.blendmode.alphaupdate && bpmem.zcontrol.pixel_format == PIXELFMT_RGBA6_Z24; -- cgit v1.2.3 From 402006a83a89bc0f790934096e915f0e8c23f808 Mon Sep 17 00:00:00 2001 From: rodolfoosvaldobogado Date: Thu, 29 Mar 2012 18:26:58 -0300 Subject: more fixes to zcomplock and opengl implementation --- .../Plugins/Plugin_VideoOGL/Src/VertexManager.cpp | 25 +++++++++++++++------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp') diff --git a/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp b/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp index dff7f8299e..dacb0f3b0e 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp @@ -224,17 +224,26 @@ void VertexManager::vFlush() ps = PixelShaderCache::SetShader(DSTALPHA_ALPHA_PASS,g_nativeVertexFmt->m_components); if (ps) PixelShaderCache::SetCurrentShader(ps->glprogid); - // only update alpha - glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_TRUE); - - glDisable(GL_BLEND); + g_renderer->ApplyState(RSM_UseDstAlpha); + if (bpmem.zmode.updateenable) + g_renderer->ApplyState(RSM_Multipass); Draw(); - // restore color mask - g_renderer->SetColorMask(); + + g_renderer->RestoreState(RSM_UseDstAlpha); + if (bpmem.zmode.updateenable) + g_renderer->RestoreState(RSM_Multipass); + } + + bool UseZcomploc = bpmem.zcontrol.zcomploc && bpmem.zmode.updateenable && !g_ActiveConfig.bEnableFastZcomploc; - if (bpmem.blendmode.blendenable || bpmem.blendmode.subtract) - glEnable(GL_BLEND); + if (UseZcomploc) + { + FRAGMENTSHADER* ps = PixelShaderCache::SetShader(DSTALPHA_ZCOMPLOC,g_nativeVertexFmt->m_components); + if (ps) PixelShaderCache::SetCurrentShader(ps->glprogid); + g_renderer->ApplyState(RSM_Zcomploc); + Draw(); + g_renderer->RestoreState(RSM_Zcomploc); } GFX_DEBUGGER_PAUSE_AT(NEXT_FLUSH, true); -- cgit v1.2.3 From 460610ea0e0d5083e261ed9d137048f2a5fc7e59 Mon Sep 17 00:00:00 2001 From: NeoBrainX Date: Fri, 30 Mar 2012 01:56:24 +0200 Subject: Revert Rodolfo's recent zcomploc commits until they actually work correctly. This reverts commit 402006a83a89bc0f790934096e915f0e8c23f808. This reverts commit 48d8d71391fc2cc40d85732680eb6421164bf87c. This reverts commit 450dcc9d2cd874f6ab40d4a339afc29f55751319. --- .../Plugins/Plugin_VideoOGL/Src/VertexManager.cpp | 25 +++++++--------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp') diff --git a/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp b/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp index dacb0f3b0e..dff7f8299e 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp @@ -224,26 +224,17 @@ void VertexManager::vFlush() ps = PixelShaderCache::SetShader(DSTALPHA_ALPHA_PASS,g_nativeVertexFmt->m_components); if (ps) PixelShaderCache::SetCurrentShader(ps->glprogid); - g_renderer->ApplyState(RSM_UseDstAlpha); - if (bpmem.zmode.updateenable) - g_renderer->ApplyState(RSM_Multipass); + // only update alpha + glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_TRUE); - Draw(); - - g_renderer->RestoreState(RSM_UseDstAlpha); - if (bpmem.zmode.updateenable) - g_renderer->RestoreState(RSM_Multipass); - } - - bool UseZcomploc = bpmem.zcontrol.zcomploc && bpmem.zmode.updateenable && !g_ActiveConfig.bEnableFastZcomploc; + glDisable(GL_BLEND); - if (UseZcomploc) - { - FRAGMENTSHADER* ps = PixelShaderCache::SetShader(DSTALPHA_ZCOMPLOC,g_nativeVertexFmt->m_components); - if (ps) PixelShaderCache::SetCurrentShader(ps->glprogid); - g_renderer->ApplyState(RSM_Zcomploc); Draw(); - g_renderer->RestoreState(RSM_Zcomploc); + // restore color mask + g_renderer->SetColorMask(); + + if (bpmem.blendmode.blendenable || bpmem.blendmode.subtract) + glEnable(GL_BLEND); } GFX_DEBUGGER_PAUSE_AT(NEXT_FLUSH, true); -- cgit v1.2.3