diff options
| author | nitsuja- <nitsuja-@hotmail.com> | 2011-01-01 00:16:02 +0000 |
|---|---|---|
| committer | nitsuja- <nitsuja-@hotmail.com> | 2011-01-01 00:16:02 +0000 |
| commit | 72738bf2e722e67f613b4a6086570e7cf09226d4 (patch) | |
| tree | b9ca3a3ba2dc47631d581e388ea7b81d837eb5ae /Source | |
| parent | 71209d99c8702d6e321f8dd98e21182c04a6a975 (diff) | |
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
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Plugins/Plugin_VideoOGL/Src/Render.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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); |
