OGL: Fix wireframe rendering.

Fixes issue 4062.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7094 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
NeoBrainX 2011-02-06 18:29:01 +00:00
parent c7783fe015
commit 2b2f060cdf
1 changed files with 7 additions and 0 deletions

View File

@ -840,6 +840,9 @@ void Renderer::ClearScreen(const EFBRectangle& rc, bool colorEnable, bool alphaE
{ {
ResetAPIState(); 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; GLenum ColorMask = GL_FALSE, AlphaMask = GL_FALSE;
if (colorEnable) ColorMask = GL_TRUE; if (colorEnable) ColorMask = GL_TRUE;
if (alphaEnable) AlphaMask = 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); glVertex3f( 1.f, -1.f, 1.f);
glEnd(); glEnd();
// reenable wireframe if necessary
if (g_ActiveConfig.bWireFrame)
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
RestoreAPIState(); RestoreAPIState();
} }