Skip to content

Commit

Permalink
iOS: Convert logical to physical bounds when resolving OpenGL multisa…
Browse files Browse the repository at this point in the history
…mpled framebuffers
  • Loading branch information
ed95 committed Oct 20, 2020
1 parent b8206e3 commit d83b3f7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions modules/juce_opengl/native/juce_OpenGL_ios.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,13 @@ class OpenGLContext::NativeContext

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
{
Expand Down

0 comments on commit d83b3f7

Please sign in to comment.