diff options
Diffstat (limited to 'backends')
-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; |