diff options
author | Johannes Schickel | 2015-12-18 21:14:48 +0100 |
---|---|---|
committer | Johannes Schickel | 2016-03-16 20:29:25 +0100 |
commit | af727afe0ceb66eaf51985ceceb2ac842b3358ee (patch) | |
tree | 90a7194bb25c83c5a50e25358e340d2a31595d4c /backends/graphics/opengl/opengl-graphics.h | |
parent | da062ad1ea2d933ae7c4b56f84f34c5fb2186196 (diff) | |
download | scummvm-rg350-af727afe0ceb66eaf51985ceceb2ac842b3358ee.tar.gz scummvm-rg350-af727afe0ceb66eaf51985ceceb2ac842b3358ee.tar.bz2 scummvm-rg350-af727afe0ceb66eaf51985ceceb2ac842b3358ee.zip |
OPENGL: Simplify context type setting.
Diffstat (limited to 'backends/graphics/opengl/opengl-graphics.h')
-rw-r--r-- | backends/graphics/opengl/opengl-graphics.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h index 5f0436c0b5..5a2b1bb373 100644 --- a/backends/graphics/opengl/opengl-graphics.h +++ b/backends/graphics/opengl/opengl-graphics.h @@ -117,11 +117,6 @@ public: protected: /** - * Whether an OpenGL (context) is active. - */ - bool isInitialized() const { return g_context.ready; } - - /** * Whether an GLES context is active. */ bool isGLESContext() const { return g_context.type == kContextGLES; } @@ -136,6 +131,16 @@ protected: void setActualScreenSize(uint width, uint height); /** + * Sets the OpenGL (ES) type the graphics manager shall work with. + * + * This needs to be called at least once (and before ever calling + * notifyContextCreate). + * + * @param type Type of the OpenGL (ES) contexts to be created. + */ + void setContextType(ContextType type); + + /** * Notify the manager of a OpenGL context change. This should be the first * thing to call after you created an OpenGL (ES) context! * @@ -143,9 +148,8 @@ protected: * (this is used for the CLUT8 game screens). * @param defaultFormatAlpha The new default format with an alpha channel * (this is used for the overlay and cursor). - * @param type Type of the created context. */ - void notifyContextCreate(const Graphics::PixelFormat &defaultFormat, const Graphics::PixelFormat &defaultFormatAlpha, ContextType type); + void notifyContextCreate(const Graphics::PixelFormat &defaultFormat, const Graphics::PixelFormat &defaultFormatAlpha); /** * Notify the manager that the OpenGL context is about to be destroyed. @@ -293,10 +297,8 @@ private: /** * Initialize the active context for use. - * - * @param type Type of the context to initialize. */ - void initializeGLContext(ContextType type); + void initializeGLContext(); protected: /** |