From 4cd76272476a2d6e5f9d90f4028c4150f55ff1b0 Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 2 Aug 2016 13:49:04 +0200 Subject: [PATCH] Fix highlight box rects for GL co-ordinate system. Refs #309 --- renderdoc/driver/gl/gl_debug.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/renderdoc/driver/gl/gl_debug.cpp b/renderdoc/driver/gl/gl_debug.cpp index d0951a221..5024a9df4 100644 --- a/renderdoc/driver/gl/gl_debug.cpp +++ b/renderdoc/driver/gl/gl_debug.cpp @@ -1724,10 +1724,10 @@ void GLReplay::RenderHighlightBox(float w, float h, float scale) rect tl = {GLint(w / 2.0f + 0.5f), GLint(h / 2.0f + 0.5f), 1, 1}; rect scissors[4] = { - {tl.x, tl.y, 1, sz}, - {tl.x + (GLint)sz, tl.y, 1, sz + 1}, + {tl.x, tl.y - (GLint)sz - 1, 1, sz + 1}, + {tl.x + (GLint)sz, tl.y - (GLint)sz - 1, 1, sz + 2}, {tl.x, tl.y, sz, 1}, - {tl.x, tl.y + (GLint)sz, sz, 1}, + {tl.x, tl.y - (GLint)sz - 1, sz, 1}, }; // inner @@ -1746,8 +1746,8 @@ void GLReplay::RenderHighlightBox(float w, float h, float scale) scissors[0].y--; scissors[1].y--; - scissors[2].y--; - scissors[3].y++; + scissors[2].y++; + scissors[3].y--; scissors[0].h += 2; scissors[1].h += 2;