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 - EGL/OpenGL ES support is broken on Linux with X11 backend
Summary: EGL/OpenGL ES support is broken on Linux with X11 backend
Status: NEW
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.8
Hardware: All Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-07 10:40 UTC by Andrey Alexeyev
Modified: 2018-04-07 10:41 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.