From c3d13b048c40b9df99d401939bd747e1de5c878e Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Sun, 18 Mar 2012 02:31:19 -0700 Subject: build against wxWidgets3 from Externals on Windows. use Externals version of libpng on Windows. --- Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Source/Plugins/Plugin_VideoOGL') diff --git a/Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj b/Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj index f782fd2c93..d72f0fa9a9 100644 --- a/Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj +++ b/Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj @@ -117,7 +117,7 @@ - ..\..\Core\Common\Src;..\..\Core\Core\Src;..\..\Core\VideoCommon\Src;..\..\Core\DolphinWX\Src;..\..\..\Externals\wxWidgets\include;..\..\..\Externals\GLew\include;..\..\..\Externals;%(AdditionalIncludeDirectories) + ..\..\Core\Common\Src;..\..\Core\Core\Src;..\..\Core\VideoCommon\Src;..\..\Core\DolphinWX\Src;..\..\..\Externals\wxWidgets3;..\..\..\Externals\wxWidgets3\include;..\..\..\Externals\GLew\include;..\..\..\Externals;%(AdditionalIncludeDirectories) true @@ -129,7 +129,7 @@ - ..\..\Core\Common\Src;..\..\Core\Core\Src;..\..\Core\VideoCommon\Src;..\..\Core\DolphinWX\Src;..\..\..\Externals\wxWidgets\include;..\..\..\Externals\GLew\include;..\..\..\Externals;%(AdditionalIncludeDirectories) + ..\..\Core\Common\Src;..\..\Core\Core\Src;..\..\Core\VideoCommon\Src;..\..\Core\DolphinWX\Src;..\..\..\Externals\wxWidgets3;..\..\..\Externals\wxWidgets3\include;..\..\..\Externals\GLew\include;..\..\..\Externals;%(AdditionalIncludeDirectories) true @@ -141,7 +141,7 @@ - ..\..\Core\Common\Src;..\..\Core\Core\Src;..\..\Core\VideoCommon\Src;..\..\Core\DolphinWX\Src;..\..\..\Externals\wxWidgets\include;..\..\..\Externals\GLew\include;..\..\..\Externals;%(AdditionalIncludeDirectories) + ..\..\Core\Common\Src;..\..\Core\Core\Src;..\..\Core\VideoCommon\Src;..\..\Core\DolphinWX\Src;..\..\..\Externals\wxWidgets3;..\..\..\Externals\wxWidgets3\include;..\..\..\Externals\GLew\include;..\..\..\Externals;%(AdditionalIncludeDirectories) true @@ -155,7 +155,7 @@ - ..\..\Core\Common\Src;..\..\Core\Core\Src;..\..\Core\VideoCommon\Src;..\..\Core\DolphinWX\Src;..\..\..\Externals\wxWidgets\include;..\..\..\Externals\GLew\include;..\..\..\Externals;%(AdditionalIncludeDirectories) + ..\..\Core\Common\Src;..\..\Core\Core\Src;..\..\Core\VideoCommon\Src;..\..\Core\DolphinWX\Src;..\..\..\Externals\wxWidgets3;..\..\..\Externals\wxWidgets3\include;..\..\..\Externals\GLew\include;..\..\..\Externals;%(AdditionalIncludeDirectories) true @@ -169,7 +169,7 @@ - ..\..\Core\Common\Src;..\..\Core\Core\Src;..\..\Core\VideoCommon\Src;..\..\Core\DolphinWX\Src;..\..\..\Externals\wxWidgets\include;..\..\..\Externals\GLew\include;..\..\..\Externals;%(AdditionalIncludeDirectories) + ..\..\Core\Common\Src;..\..\Core\Core\Src;..\..\Core\VideoCommon\Src;..\..\Core\DolphinWX\Src;..\..\..\Externals\wxWidgets3;..\..\..\Externals\wxWidgets3\include;..\..\..\Externals\GLew\include;..\..\..\Externals;%(AdditionalIncludeDirectories) true @@ -183,7 +183,7 @@ - ..\..\Core\Common\Src;..\..\Core\Core\Src;..\..\Core\VideoCommon\Src;..\..\Core\DolphinWX\Src;..\..\..\Externals\wxWidgets\include;..\..\..\Externals\GLew\include;..\..\..\Externals;%(AdditionalIncludeDirectories) + ..\..\Core\Common\Src;..\..\Core\Core\Src;..\..\Core\VideoCommon\Src;..\..\Core\DolphinWX\Src;..\..\..\Externals\wxWidgets3;..\..\..\Externals\wxWidgets3\include;..\..\..\Externals\GLew\include;..\..\..\Externals;%(AdditionalIncludeDirectories) true -- cgit v1.2.3 From c5d746f3d87f70beb803218fc42f0c4859544b64 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Sun, 18 Mar 2012 06:41:12 -0700 Subject: remove scons files from VS projects --- Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj | 1 - Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj.filters | 1 - 2 files changed, 2 deletions(-) (limited to 'Source/Plugins/Plugin_VideoOGL') diff --git a/Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj b/Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj index d72f0fa9a9..18b8ac4d84 100644 --- a/Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj +++ b/Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj @@ -235,7 +235,6 @@ - diff --git a/Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj.filters b/Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj.filters index ed581ff963..cd170691da 100644 --- a/Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj.filters +++ b/Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj.filters @@ -74,7 +74,6 @@ - -- cgit v1.2.3 From 56b1373baff6f152e51fda96d8d7c0296bff2a70 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Sun, 25 Mar 2012 12:55:02 -0700 Subject: Remove scons-related files --- Source/Plugins/Plugin_VideoOGL/SConscript | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 Source/Plugins/Plugin_VideoOGL/SConscript (limited to 'Source/Plugins/Plugin_VideoOGL') diff --git a/Source/Plugins/Plugin_VideoOGL/SConscript b/Source/Plugins/Plugin_VideoOGL/SConscript deleted file mode 100644 index 4b601fca83..0000000000 --- a/Source/Plugins/Plugin_VideoOGL/SConscript +++ /dev/null @@ -1,22 +0,0 @@ -# -*- python -*- - -Import('env') -import os -import sys - -files = [ - 'Src/FramebufferManager.cpp', - 'Src/GLUtil.cpp', - 'Src/NativeVertexFormat.cpp', - 'Src/PixelShaderCache.cpp', - 'Src/PostProcessing.cpp', - 'Src/RasterFont.cpp', - 'Src/Render.cpp', - 'Src/TextureCache.cpp', - 'Src/TextureConverter.cpp', - 'Src/VertexManager.cpp', - 'Src/VertexShaderCache.cpp', - 'Src/main.cpp', - ] - -env['LIBS'] += env.StaticLibrary('videoogl', files) -- cgit v1.2.3 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') 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 450dcc9d2cd874f6ab40d4a339afc29f55751319 Mon Sep 17 00:00:00 2001 From: rodolfoosvaldobogado Date: Tue, 27 Mar 2012 15:44:58 -0300 Subject: As requested, this is my implementation of zcomploc using a multi-pass algorithm. My apologize to the others devs for committing in the main branch but is the only way to get this tested as soon as possible. please test for regressions, speed and for other issues fixed, as a example, the black color in water splash in super mario galaxy are fixed with this rev. please as soon as yo find a bug let me know. --- Source/Plugins/Plugin_VideoOGL/Src/Render.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Plugins/Plugin_VideoOGL') diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.h b/Source/Plugins/Plugin_VideoOGL/Src/Render.h index 9cf1573b56..5a184dceeb 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.h @@ -27,8 +27,8 @@ public: void SetInterlacingMode(); // TODO: Implement and use these - void ApplyState(bool bUseDstAlpha) {} - void RestoreState() {} + void ApplyState(RenderStateMode mode){} + void RestoreState(RenderStateMode mode){} void RenderText(const char* pstr, int left, int top, u32 color); void DrawDebugInfo(); -- 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 --- Source/Plugins/Plugin_VideoOGL/Src/Render.cpp | 37 ++++++++++++++++++++++ Source/Plugins/Plugin_VideoOGL/Src/Render.h | 5 ++- .../Plugins/Plugin_VideoOGL/Src/VertexManager.cpp | 25 ++++++++++----- 3 files changed, 56 insertions(+), 11 deletions(-) (limited to 'Source/Plugins/Plugin_VideoOGL') diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index 9883d35fbb..6b0a3f1481 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -632,6 +632,43 @@ void Renderer::SetScissorRect(const TargetRectangle& rc) glScissor(rc.left, rc.bottom, rc.GetWidth(), rc.GetHeight()); } +void Renderer::ApplyState(RenderStateMode mode) +{ + if(mode == RSM_Zcomploc) + { + glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); + } + else if(mode == RSM_Multipass) + { + glEnable(GL_DEPTH_TEST); + glDepthMask(GL_FALSE); + glDepthFunc(GL_EQUAL); + } + else if (mode == RSM_UseDstAlpha) + { + glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_TRUE); + glDisable(GL_BLEND); + } +} + +void Renderer::RestoreState(RenderStateMode mode) +{ + if(mode == RSM_Zcomploc) + { + SetColorMask(); + } + else if(mode == RSM_Multipass) + { + SetDepthMode(); + } + else if (mode == RSM_UseDstAlpha) + { + SetColorMask(); + if (bpmem.blendmode.blendenable || bpmem.blendmode.subtract) + glEnable(GL_BLEND); + } +} + void Renderer::SetColorMask() { // Only enable alpha channel if it's supported by the current EFB format diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.h b/Source/Plugins/Plugin_VideoOGL/Src/Render.h index 5a184dceeb..ca87adea6b 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.h @@ -26,9 +26,8 @@ public: void SetSamplerState(int stage,int texindex); void SetInterlacingMode(); - // TODO: Implement and use these - void ApplyState(RenderStateMode mode){} - void RestoreState(RenderStateMode mode){} + void ApplyState(RenderStateMode mode); + void RestoreState(RenderStateMode mode); void RenderText(const char* pstr, int left, int top, u32 color); void DrawDebugInfo(); 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. --- Source/Plugins/Plugin_VideoOGL/Src/Render.cpp | 37 ---------------------- Source/Plugins/Plugin_VideoOGL/Src/Render.h | 5 +-- .../Plugins/Plugin_VideoOGL/Src/VertexManager.cpp | 25 +++++---------- 3 files changed, 11 insertions(+), 56 deletions(-) (limited to 'Source/Plugins/Plugin_VideoOGL') diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index 6b0a3f1481..9883d35fbb 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -632,43 +632,6 @@ void Renderer::SetScissorRect(const TargetRectangle& rc) glScissor(rc.left, rc.bottom, rc.GetWidth(), rc.GetHeight()); } -void Renderer::ApplyState(RenderStateMode mode) -{ - if(mode == RSM_Zcomploc) - { - glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); - } - else if(mode == RSM_Multipass) - { - glEnable(GL_DEPTH_TEST); - glDepthMask(GL_FALSE); - glDepthFunc(GL_EQUAL); - } - else if (mode == RSM_UseDstAlpha) - { - glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_TRUE); - glDisable(GL_BLEND); - } -} - -void Renderer::RestoreState(RenderStateMode mode) -{ - if(mode == RSM_Zcomploc) - { - SetColorMask(); - } - else if(mode == RSM_Multipass) - { - SetDepthMode(); - } - else if (mode == RSM_UseDstAlpha) - { - SetColorMask(); - if (bpmem.blendmode.blendenable || bpmem.blendmode.subtract) - glEnable(GL_BLEND); - } -} - void Renderer::SetColorMask() { // Only enable alpha channel if it's supported by the current EFB format diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.h b/Source/Plugins/Plugin_VideoOGL/Src/Render.h index ca87adea6b..9cf1573b56 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.h @@ -26,8 +26,9 @@ public: void SetSamplerState(int stage,int texindex); void SetInterlacingMode(); - void ApplyState(RenderStateMode mode); - void RestoreState(RenderStateMode mode); + // TODO: Implement and use these + void ApplyState(bool bUseDstAlpha) {} + void RestoreState() {} void RenderText(const char* pstr, int left, int top, u32 color); void DrawDebugInfo(); 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