aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/opengl
diff options
context:
space:
mode:
authorJohannes Schickel2013-08-18 16:56:34 +0200
committerJohannes Schickel2013-10-19 22:14:24 +0200
commit5ce830b97643fc76bdcafdbbe09e226519a9d2e6 (patch)
tree2081a1d9eff756823e3141aa019e141bb1e5f18c /backends/graphics/opengl
parent46323074e77622e7d08fe20bfdcc459b8eba08a3 (diff)
downloadscummvm-rg350-5ce830b97643fc76bdcafdbbe09e226519a9d2e6.tar.gz
scummvm-rg350-5ce830b97643fc76bdcafdbbe09e226519a9d2e6.tar.bz2
scummvm-rg350-5ce830b97643fc76bdcafdbbe09e226519a9d2e6.zip
SDL: Add a OpenGL SDL backend and hook it into the SDL backend.
The hooking code is nearly exactly the old hooking code. Only the OpenGL SDL creation has been adapted since it uses a different constructor now.
Diffstat (limited to 'backends/graphics/opengl')
-rw-r--r--backends/graphics/opengl/opengl-graphics.cpp4
-rw-r--r--backends/graphics/opengl/opengl-graphics.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index 7ea880c92e..87d6d3c2e5 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -106,6 +106,10 @@ const OSystem::GraphicsMode glGraphicsModes[] = {
} // End of anonymous namespace
+const OSystem::GraphicsMode *OpenGLGraphicsManager::supportedGraphicsModes() {
+ return glGraphicsModes;
+}
+
const OSystem::GraphicsMode *OpenGLGraphicsManager::getSupportedGraphicsModes() const {
return glGraphicsModes;
}
diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h
index e21bda4b8a..5aa521cb7a 100644
--- a/backends/graphics/opengl/opengl-graphics.h
+++ b/backends/graphics/opengl/opengl-graphics.h
@@ -47,6 +47,10 @@ public:
virtual void setFeatureState(OSystem::Feature f, bool enable);
virtual bool getFeatureState(OSystem::Feature f);
+ // HACK: This is required for the SDL backend to switch between OpenGL SDL
+ // and Surface SDL.
+ static const OSystem::GraphicsMode *supportedGraphicsModes();
+
virtual const OSystem::GraphicsMode *getSupportedGraphicsModes() const;
virtual int getDefaultGraphicsMode() const;
virtual bool setGraphicsMode(int mode);