diff options
author | Johannes Schickel | 2015-12-11 19:23:41 +0100 |
---|---|---|
committer | Johannes Schickel | 2015-12-12 22:31:35 +0100 |
commit | fe2ee9ecf5709d49279265f0e5d3b2d0a5688265 (patch) | |
tree | ac75a57549c0dd0d5020a423b2e8b03505f7d15f /backends/graphics/opengl | |
parent | 3232050dfc3283501b33881c762a5e9b188cf985 (diff) | |
download | scummvm-rg350-fe2ee9ecf5709d49279265f0e5d3b2d0a5688265.tar.gz scummvm-rg350-fe2ee9ecf5709d49279265f0e5d3b2d0a5688265.tar.bz2 scummvm-rg350-fe2ee9ecf5709d49279265f0e5d3b2d0a5688265.zip |
OPENGL: Refactor screen refresh handling.
Subclasses of OpenGLGraphicsManager are now supposed to supply a refreshScreen
function which handles actual screen updating (for example, buffer swapping).
Diffstat (limited to 'backends/graphics/opengl')
-rw-r--r-- | backends/graphics/opengl/opengl-graphics.cpp | 2 | ||||
-rw-r--r-- | backends/graphics/opengl/opengl-graphics.h | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index 5821856c30..301813c23f 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -431,6 +431,8 @@ void OpenGLGraphicsManager::updateScreen() { GLCALL(glColor4f(1.0f, 1.0f, 1.0f, 1.0f)); } #endif + + refreshScreen(); } Graphics::Surface *OpenGLGraphicsManager::lockScreen() { diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h index cec970e0cc..3634e145ce 100644 --- a/backends/graphics/opengl/opengl-graphics.h +++ b/backends/graphics/opengl/opengl-graphics.h @@ -263,6 +263,11 @@ protected: virtual bool loadVideoMode(uint requestedWidth, uint requestedHeight, const Graphics::PixelFormat &format) = 0; /** + * Refresh the screen contents. + */ + virtual void refreshScreen() = 0; + + /** * Save a screenshot of the full display as BMP to the given file. This * uses Common::DumpFile for writing the screenshot. * |