We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4127

Summary: EGL/OpenGL ES support is broken on Linux with X11 backend
Product: SDL Reporter: Andrey Alexeyev <akari>
Component: videoAssignee: Sam Lantinga <slouken>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: akari
Version: 2.0.8   
Hardware: All   
OS: Linux   

Description Andrey Alexeyev 2018-04-07 10:40:55 UTC
First of all, the SDL_GL_CONTEXT_PROFILE_MASK attribute needs to be set before attempting to load the GL library in this configuration, since it determines whether to load libGLES or libGL. This is not obvious and not documented anywhere.

However, consider this ugly hack here: https://hg.libsdl.org/SDL/file/f1084c419f33/src/video/SDL_video.c#l213

This forces the library to load at the video driver initialization time, giving the application no chance to request a GLES context. It can be worked around by setting one of the hints that forces ShouldUseTextureFramebuffer to return early.