diff --git a/changes.txt b/changes.txt index 127821806..eadd6f8c2 100644 --- a/changes.txt +++ b/changes.txt @@ -97,6 +97,7 @@ Released: N/A * Updated love.graphics.newImage's optional second argument to be a table of flags (flags are "mipmaps" and "srgb".) * Updated Images to require setting the mipmaps flag to true on creation in order to use mipmaps. * Updated Images to allow mipmaps for non-power-of-two sizes. + * Updated the arguments for the standard variants of love.graphics.newMesh. They're now newMesh(vertices [, drawmode, usage]) and newMesh(vertexcount [, drawmode, usage]). * Updated Mesh:setVertex to explicitly set every component of every attribute in the vertex, instead of having default values. LOVE 0.9.2 [Baby Inspector] diff --git a/src/modules/graphics/opengl/Graphics.cpp b/src/modules/graphics/opengl/Graphics.cpp index 2b50246da..830fad24f 100644 --- a/src/modules/graphics/opengl/Graphics.cpp +++ b/src/modules/graphics/opengl/Graphics.cpp @@ -39,7 +39,7 @@ #include #ifdef LOVE_IOS -#include +#include #endif namespace love @@ -522,9 +522,11 @@ void Graphics::present() discard({}, true); #ifdef LOVE_IOS - // Hack: SDL's color renderbuffer needs to be bound when swapBuffers is called. - GLuint rbo = SDL_iPhoneGetViewRenderbuffer(SDL_GL_GetCurrentWindow()); - glBindRenderbuffer(GL_RENDERBUFFER, rbo); + // Hack: SDL's color renderbuffer must be bound when swapBuffers is called. + SDL_SysWMinfo info = {}; + SDL_VERSION(&info.version); + SDL_GetWindowWMInfo(SDL_GL_GetCurrentWindow(), &info); + glBindRenderbuffer(GL_RENDERBUFFER, info.info.uikit.colorbuffer); #endif currentWindow->swapBuffers(); diff --git a/src/modules/graphics/opengl/OpenGL.cpp b/src/modules/graphics/opengl/OpenGL.cpp index 5ffd39fea..8bfd89479 100644 --- a/src/modules/graphics/opengl/OpenGL.cpp +++ b/src/modules/graphics/opengl/OpenGL.cpp @@ -37,7 +37,7 @@ #include #ifdef LOVE_IOS -#include +#include #endif namespace love @@ -439,7 +439,10 @@ GLuint OpenGL::getDefaultFBO() const { #ifdef LOVE_IOS // Hack: iOS uses a custom FBO. - return SDL_iPhoneGetViewFramebuffer(SDL_GL_GetCurrentWindow()); + SDL_SysWMinfo info = {}; + SDL_VERSION(&info.version); + SDL_GetWindowWMInfo(SDL_GL_GetCurrentWindow(), &info); + return info.info.uikit.framebuffer; #else return 0; #endif