Commit d0bd0e485585202ff7091378d51ac292a04e6863

Alex Szpakowski 2016-07-02T13:38:31

iOS: Fix an OpenGL ES error when rotating the device if MSAA is used (thanks Cole Campbell!) Fixes bug #3378.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/video/uikit/SDL_uikitopenglview.m b/src/video/uikit/SDL_uikitopenglview.m
index 60c247e..aae7ee8 100644
--- a/src/video/uikit/SDL_uikitopenglview.m
+++ b/src/video/uikit/SDL_uikitopenglview.m
@@ -239,7 +239,7 @@
 
     if (msaaRenderbuffer != 0) {
         glBindRenderbuffer(GL_RENDERBUFFER, msaaRenderbuffer);
-        glRenderbufferStorageMultisample(GL_RENDERBUFFER, samples, GL_RGBA8, backingWidth, backingHeight);
+        glRenderbufferStorageMultisample(GL_RENDERBUFFER, samples, colorBufferFormat, backingWidth, backingHeight);
     }
 
     if (depthRenderbuffer != 0) {