Browse Source

iOS: Convert logical to physical bounds when resolving OpenGL multisampled framebuffers

tags/2021-05-28
ed 4 years ago
parent
commit
d83b3f7716
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      modules/juce_opengl/native/juce_OpenGL_ios.h

+ 7
- 3
modules/juce_opengl/native/juce_OpenGL_ios.h View File

@@ -154,9 +154,13 @@ public:
if (openGLversion >= openGL3_2) 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 else
{ {


Loading…
Cancel
Save