From d83b3f77167bb65d35c3585e2ccbe88e40993d77 Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 20 Oct 2020 09:38:42 +0100 Subject: [PATCH] iOS: Convert logical to physical bounds when resolving OpenGL multisampled framebuffers --- modules/juce_opengl/native/juce_OpenGL_ios.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/juce_opengl/native/juce_OpenGL_ios.h b/modules/juce_opengl/native/juce_OpenGL_ios.h index ee8e5ac46f..3ffac72ce9 100644 --- a/modules/juce_opengl/native/juce_OpenGL_ios.h +++ b/modules/juce_opengl/native/juce_OpenGL_ios.h @@ -154,9 +154,13 @@ public: if (openGLversion >= openGL3_2) { - glBlitFramebuffer (0, 0, lastBounds.getWidth(), lastBounds.getHeight(), - 0, 0, lastBounds.getWidth(), lastBounds.getHeight(), - GL_COLOR_BUFFER_BIT, GL_NEAREST); + auto w = roundToInt (lastBounds.getWidth() * glLayer.contentsScale); + auto h = roundToInt (lastBounds.getHeight() * glLayer.contentsScale); + + glBlitFramebuffer (0, 0, w, h, + 0, 0, w, h, + GL_COLOR_BUFFER_BIT, + GL_NEAREST); } else {