diff options
author | Johannes Schickel | 2015-12-08 21:43:34 +0100 |
---|---|---|
committer | Johannes Schickel | 2015-12-08 21:43:34 +0100 |
commit | 33be7ef5dd1be112f24b56fc1ff1bf4fabc190ed (patch) | |
tree | de4e5d5b31ac1f60e8315cf1441143418b290f76 /backends/graphics/openglsdl/openglsdl-graphics.cpp | |
parent | 457640a16257be20581080d6d682994cca94ba37 (diff) | |
parent | ae1be06db831e9480a060ef513aad6819be5cdd0 (diff) | |
download | scummvm-rg350-33be7ef5dd1be112f24b56fc1ff1bf4fabc190ed.tar.gz scummvm-rg350-33be7ef5dd1be112f24b56fc1ff1bf4fabc190ed.tar.bz2 scummvm-rg350-33be7ef5dd1be112f24b56fc1ff1bf4fabc190ed.zip |
Merge branch 'rpi-sdl2'
This is a manual merge of pull request #632. The history fo the PR has been
cleaned up.
Diffstat (limited to 'backends/graphics/openglsdl/openglsdl-graphics.cpp')
-rw-r--r-- | backends/graphics/openglsdl/openglsdl-graphics.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp index a2b172f14a..42327197b7 100644 --- a/backends/graphics/openglsdl/openglsdl-graphics.cpp +++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp @@ -386,6 +386,13 @@ bool OpenGLSdlGraphicsManager::setupMode(uint width, uint height) { } } +#ifdef USE_GLES + // SDL2 will create a GLES2 context by default, so this is needed for GLES1-profile + // functions to work. + SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 1); + SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1); +#endif _glContext = SDL_GL_CreateContext(_window->getSDLWindow()); if (!_glContext) { return false; |