From 72738bf2e722e67f613b4a6086570e7cf09226d4 Mon Sep 17 00:00:00 2001 From: nitsuja- Date: Sat, 1 Jan 2011 00:16:02 +0000 Subject: [PATCH] clamp OGL depth clear value, this might fix a problem some people reported with r6678 git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6704 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_VideoOGL/Src/Render.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index a8824524c3..1434c1c793 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -864,6 +864,10 @@ void Renderer::ClearScreen(const EFBRectangle& rc, bool colorEnable, bool alphaE (float)(color & 0xFF) / 255.0f, (float)((color >> 24) & 0xFF) / 255.0f); float zval = -1.f + 2.f * (float)(z & 0xFFFFFF) / float(0xFFFFFF); // convert range [0;1] to [-1;1] + if(zval > 1.0f) + zval = 1.0f; + if(zval < -1.0f) + zval = -1.0f; glBegin(GL_QUADS); glVertex3f(-1.f, -1.f, zval); glVertex3f(-1.f, 1.f, zval);