mutter/cogl/winsys
Neil Roberts 07a50012b9 egl: Only allow GLES2 context creation for the GLES2 driver
Previously, Cogl was advertising the GLES2 context feature whenever
the EGL winsys was used, even if the winsys was used with the GL
driver. This wasn't working because when the GL context is created the
API is set to GL with eglBindAPI and it is never changed back to GLES
when the GLES2 context is created. That meant that the created context
is actually GL not GLES2. Any rendering would then fail because the GL
context does not understand the precision statement.

It could be possible to fix it so that it will set the API correctly
before creating the context. It would then also need to reset the API
and unbind the previous context whenever switching between GLES2 and
GL contexts. If the context isn't unbound first then eglMakeCurrent
will actually try to bind both contexts at the same time and at least
Mesa detects this situation and reports that the two contexts
conflict. Presumably we would also need to do something more clever
when we retrieve the function pointers for the GLES2 context.
Currently we just copy them from the CoglContext but if the context is
using the GL driver then this would mean the functions came from libGL
not libGLESv2.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 624dea207cf76ae9ccd7f57c4ebd15d3bd65bff0)
2012-10-01 15:05:11 +01:00
..
cogl-texture-pixmap-x11-private.h Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
cogl-texture-pixmap-x11.c texture: Add a context pointer to each texture 2012-09-17 23:06:20 +01:00
cogl-texture-pixmap-x11.h Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00
cogl-winsys-egl-android-private.h Add a separate winsys vtable for each EGL platform 2011-12-08 17:38:25 +00:00
cogl-winsys-egl-android.c Adds initial GLES2 integration support 2012-08-06 14:27:42 +01:00
cogl-winsys-egl-feature-functions.h kms: Use a dummy surface instead of the surfaceless extension 2012-08-15 17:29:16 +01:00
cogl-winsys-egl-gdl-private.h Add a separate winsys vtable for each EGL platform 2011-12-08 17:38:25 +00:00
cogl-winsys-egl-gdl.c Adds initial GLES2 integration support 2012-08-06 14:27:42 +01:00
cogl-winsys-egl-kms-private.h egl: Split out the KMS winsys as overrides of the EGL winsys 2011-12-09 17:29:49 +00:00
cogl-winsys-egl-kms.c kms: Fix the version check for GBM 2012-09-06 18:30:30 +01:00
cogl-winsys-egl-null-private.h Add a separate winsys vtable for each EGL platform 2011-12-08 17:38:25 +00:00
cogl-winsys-egl-null.c Adds initial GLES2 integration support 2012-08-06 14:27:42 +01:00
cogl-winsys-egl-private.h kms: Use a dummy surface instead of the surfaceless extension 2012-08-15 17:29:16 +01:00
cogl-winsys-egl-wayland-private.h Add a separate winsys vtable for each EGL platform 2011-12-08 17:38:25 +00:00
cogl-winsys-egl-wayland.c Adds initial GLES2 integration support 2012-08-06 14:27:42 +01:00
cogl-winsys-egl-x11-private.h Rename the EGL_X11 winsys to EGL_XLIB 2011-12-14 16:40:26 +00:00
cogl-winsys-egl-x11.c egl-x11: Don't use GLXDrawable on EGL 2012-08-06 18:51:33 +01:00
cogl-winsys-egl.c egl: Only allow GLES2 context creation for the GLES2 driver 2012-10-01 15:05:11 +01:00
cogl-winsys-glx-feature-functions.h winsys-glx: Don't assume that copy_sub_buffer is synchronized 2012-03-15 15:48:13 +00:00
cogl-winsys-glx-private.h Add -Wmissing-declarations to maintainer flags and fix problems 2012-03-06 18:45:44 +00:00
cogl-winsys-glx.c winsys-glx: Remove the vblank counter feature when indirect rendering 2012-09-28 17:15:11 +01:00
cogl-winsys-private.h Avoid including the EGL headers from the public Cogl headers 2012-08-06 18:51:32 +01:00
cogl-winsys-sdl2.c Don't use eglGetProcAddress to retrieve core functions 2012-08-06 14:27:45 +01:00
cogl-winsys-sdl-private.h Add -Wmissing-declarations to maintainer flags and fix problems 2012-03-06 18:45:44 +00:00
cogl-winsys-sdl.c cogl-winsys-sdl: Fix the signature for the get_proc_address method 2012-08-06 18:51:33 +01:00
cogl-winsys-stub-private.h Make stub winsys into a proper winsys backend 2011-06-01 20:44:41 +01:00
cogl-winsys-stub.c Don't use eglGetProcAddress to retrieve core functions 2012-08-06 14:27:45 +01:00
cogl-winsys-wgl-feature-functions.h Add a WGL winsys 2011-05-10 17:58:41 +01:00
cogl-winsys-wgl-private.h Add -Wmissing-declarations to maintainer flags and fix problems 2012-03-06 18:45:44 +00:00
cogl-winsys-wgl.c Add conf vars to trick Cogl to think extensions are disabled 2012-08-06 18:51:33 +01:00
cogl-winsys.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00