mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
cogl: Fix GLES2 fallback
Say you're using intel gen3, you poor soul. Your big-GL maxes out at 1.5
unless you use dirty tricks, but you do have GLES2. We try to fall back
to GLES in this case, but we only ever say eglBindAPI(EGL_OPENGL_API).
So when we go to do CreateContext, even though we think we've requested
GLES 2.0, the driver will compare that "2.0" against the maximum big-GL
version, and things will fail.
Fix this by binding EGL_OPENGL_ES_API before trying a GLES context.
https://gitlab.gnome.org/GNOME/mutter/issues/635
(cherry picket from commit f4f7e31303
)
This commit is contained in:
parent
5ae317e004
commit
ca5ed7369d
@ -329,6 +329,8 @@ try_create_context (CoglDisplay *display,
|
||||
if (renderer->driver == COGL_DRIVER_GL ||
|
||||
renderer->driver == COGL_DRIVER_GL3)
|
||||
eglBindAPI (EGL_OPENGL_API);
|
||||
else if (renderer->driver == COGL_DRIVER_GLES2)
|
||||
eglBindAPI (EGL_OPENGL_ES_API);
|
||||
|
||||
egl_attributes_from_framebuffer_config (display,
|
||||
&display->onscreen_template->config,
|
||||
|
Loading…
Reference in New Issue
Block a user