diff options
author | vanfanel | 2015-12-04 13:11:22 +0100 |
---|---|---|
committer | Johannes Schickel | 2015-12-08 21:41:40 +0100 |
commit | 1eecc41ef65300fb849e42110a2463fa2b3ce376 (patch) | |
tree | 6ff29bc603f78c37f670fb2b29f56ffb53ff24fc /backends/graphics/openglsdl | |
parent | 1779fba59bb94b136be640834036df0f67881319 (diff) | |
download | scummvm-rg350-1eecc41ef65300fb849e42110a2463fa2b3ce376.tar.gz scummvm-rg350-1eecc41ef65300fb849e42110a2463fa2b3ce376.tar.bz2 scummvm-rg350-1eecc41ef65300fb849e42110a2463fa2b3ce376.zip |
OPENGLSDL: Request GLES1.1 context with SDL2 for GLES targets.
Diffstat (limited to 'backends/graphics/openglsdl')
-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; |