From e318e49061aba49e11e4ec8daef8d2d85d030233 Mon Sep 17 00:00:00 2001 From: raven02 Date: Sun, 7 Jul 2013 00:47:25 +0800 Subject: [PATCH] Apply scissor() , Last Ranker need it to render correctly --- GPU/GLES/Framebuffer.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/GPU/GLES/Framebuffer.cpp b/GPU/GLES/Framebuffer.cpp index 6289b9ad5f..fbdbc7ac1c 100644 --- a/GPU/GLES/Framebuffer.cpp +++ b/GPU/GLES/Framebuffer.cpp @@ -433,6 +433,11 @@ void FramebufferManager::SetRenderFrameBuffer() { int drawing_width = ((gstate.region2) & 0x3FF) + 1; int drawing_height = ((gstate.region2 >> 10) & 0x3FF) + 1; + if (drawing_width > gstate.getScissorX2() + 1) + drawing_width = gstate.getScissorX2() + 1; + if (drawing_height > gstate.getScissorY2() + 1) + drawing_height = gstate.getScissorY2() + 1; + // As there are no clear "framebuffer width" and "framebuffer height" registers, // we need to infer the size of the current framebuffer somehow. Let's try the viewport.