From fe2ee9ecf5709d49279265f0e5d3b2d0a5688265 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 11 Dec 2015 19:23:41 +0100 Subject: 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). --- backends/graphics/opengl/opengl-graphics.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'backends/graphics/opengl/opengl-graphics.h') 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 @@ -262,6 +262,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. -- cgit v1.2.3 From f65a8b26898db3bd870010fc3a0b0b71e50e16b7 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 11 Dec 2015 19:54:47 +0100 Subject: OPENGL: Only redraw screen when actual changes happened. --- backends/graphics/opengl/opengl-graphics.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'backends/graphics/opengl/opengl-graphics.h') diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h index 3634e145ce..e88c3ae243 100644 --- a/backends/graphics/opengl/opengl-graphics.h +++ b/backends/graphics/opengl/opengl-graphics.h @@ -469,6 +469,15 @@ private: */ byte _cursorPalette[3 * 256]; + // + // Misc + // + + /** + * Whether the screen contents shall be forced to redrawn. + */ + bool _forceRedraw; + /** * Draws a rectangle */ -- cgit v1.2.3 From 693834e8c6e9bf01925dc1731dad44d15f880be9 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 11 Dec 2015 21:22:42 +0100 Subject: OPENGL: Implement black borders using scissor test. --- backends/graphics/opengl/opengl-graphics.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backends/graphics/opengl/opengl-graphics.h') diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h index e88c3ae243..9578839383 100644 --- a/backends/graphics/opengl/opengl-graphics.h +++ b/backends/graphics/opengl/opengl-graphics.h @@ -479,9 +479,9 @@ private: bool _forceRedraw; /** - * Draws a rectangle + * Number of frames glClear shall ignore scissor testing. */ - void drawRect(GLfloat x, GLfloat y, GLfloat w, GLfloat h); + uint _scissorOverride; #ifdef USE_OSD // -- cgit v1.2.3