From 2b2f060cdf78f27e8c7bc3c30f476808fb292dd5 Mon Sep 17 00:00:00 2001 From: NeoBrainX Date: Sun, 6 Feb 2011 18:29:01 +0000 Subject: [PATCH] OGL: Fix wireframe rendering. Fixes issue 4062. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7094 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_VideoOGL/Src/Render.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index e6fa8ae741..666063207e 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -840,6 +840,9 @@ void Renderer::ClearScreen(const EFBRectangle& rc, bool colorEnable, bool alphaE { ResetAPIState(); + // make sure to disable wireframe when drawing the clear quad + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); + GLenum ColorMask = GL_FALSE, AlphaMask = GL_FALSE; if (colorEnable) ColorMask = GL_TRUE; if (alphaEnable) AlphaMask = GL_TRUE; @@ -874,6 +877,10 @@ void Renderer::ClearScreen(const EFBRectangle& rc, bool colorEnable, bool alphaE glVertex3f( 1.f, -1.f, 1.f); glEnd(); + // reenable wireframe if necessary + if (g_ActiveConfig.bWireFrame) + glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); + RestoreAPIState(); }