aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/opengl/opengl-graphics.h
diff options
context:
space:
mode:
Diffstat (limited to 'backends/graphics/opengl/opengl-graphics.h')
-rw-r--r--backends/graphics/opengl/opengl-graphics.h22
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:
/**