From 380b51dc6d0ec1204a0b3c24f29f3720d385b319 Mon Sep 17 00:00:00 2001 From: raven02 Date: Sat, 27 Jul 2013 18:20:07 +0800 Subject: [PATCH] Revert clamp to zero and use another attempt fix --- GPU/GLES/StateMapping.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/GPU/GLES/StateMapping.cpp b/GPU/GLES/StateMapping.cpp index 501c31bd33..6b9683be58 100644 --- a/GPU/GLES/StateMapping.cpp +++ b/GPU/GLES/StateMapping.cpp @@ -363,11 +363,7 @@ void TransformDrawEngine::ApplyDrawState(int prim) { vpHeight *= renderHeightFactor; // Flip vpY0 to match the OpenGL coordinate system. - vpY0 = renderHeight - (vpY0 + vpHeight); - - // Clamp vpX0/vpY0 to zero when negative value retured. - vpY0 = vpY0 < 0 ? 0 : vpY0; - vpX0 = vpX0 < 0 ? 0 : vpX0; + vpY0 = renderHeight - (vpYb - offsetY + fabsf(vpYa)) * renderHeightFactor; glstate.viewport.set(vpX0 + renderX, vpY0 + renderY, vpWidth, vpHeight); // Sadly, as glViewport takes integers, we will not be able to support sub pixel offsets this way. But meh.