aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/openglsdl/openglsdl-graphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/graphics/openglsdl/openglsdl-graphics.cpp')
-rw-r--r--backends/graphics/openglsdl/openglsdl-graphics.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index 42327197b7..892dfc6cd3 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -236,13 +236,6 @@ void OpenGLSdlGraphicsManager::updateScreen() {
}
OpenGLGraphicsManager::updateScreen();
-
- // Swap OpenGL buffers
-#if SDL_VERSION_ATLEAST(2, 0, 0)
- SDL_GL_SwapWindow(_window->getSDLWindow());
-#else
- SDL_GL_SwapBuffers();
-#endif
}
void OpenGLSdlGraphicsManager::notifyVideoExpose() {
@@ -301,6 +294,15 @@ bool OpenGLSdlGraphicsManager::loadVideoMode(uint requestedWidth, uint requested
return setupMode(requestedWidth, requestedHeight);
}
+void OpenGLSdlGraphicsManager::refreshScreen() {
+ // Swap OpenGL buffers
+#if SDL_VERSION_ATLEAST(2, 0, 0)
+ SDL_GL_SwapWindow(_window->getSDLWindow());
+#else
+ SDL_GL_SwapBuffers();
+#endif
+}
+
bool OpenGLSdlGraphicsManager::setupMode(uint width, uint height) {
// In case we request a fullscreen mode we will use the mode the user
// has chosen last time or the biggest mode available.