mutter/cogl/winsys
Neil Roberts df77e8565e Don't use eglGetProcAddress to retrieve core functions
According to the EGL spec, eglGetProcAddress should only be used to
retrieve extension functions. It also says that returning non-NULL
does not mean the extension is available so you could interpret this
as saying that the function is allowed to return garbage for core
functions. This seems to happen at least for the Android
implementation of EGL.

To workaround this the winsys's are now passed down a flag to say
whether the function is from the core API. This information is already
in the gl-prototypes headers as the minimum core GL version and as a
pair of flags to specify whether it is available in core GLES1 and
GLES2. If the function is in core the EGL winsys will now avoid using
eglGetProcAddress and always fallback to querying the library directly
with the GModule API.

The GLX winsys is left alone because glXGetProcAddress apparently
supports querying core API and extension functions.

The WGL winsys could ideally be changed because wglGetProcAddress
should also only be used for extension functions but the situation is
slightly different because WGL considers anything from GL > 1.1 to be
an extension so it would need a bit more information to determine
whether to query the function directly from the library.

The SDL winsys is also left alone because it's not as easy to portably
determine which GL library SDL has chosen to load in order to resolve
the symbols directly.

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

(cherry picked from commit 72089730ad06ccdd38a344279a893965ae68cec1)

  Since we aren't able to break API on the 1.12 branch
  cogl_get_proc_address is still supported but isn't easily able to
  determine whether the given name corresponds to a core symbol or
  not.  For now we just assume the symbol being queried isn't part
  of the core GL api and update the documentation accordingly.
2012-08-06 14:27:45 +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 Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +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
cogl-winsys-egl-android.c Adds initial GLES2 integration support 2012-08-06 14:27:42 +01:00
cogl-winsys-egl-feature-functions.h
cogl-winsys-egl-gdl-private.h
cogl-winsys-egl-gdl.c Adds initial GLES2 integration support 2012-08-06 14:27:42 +01:00
cogl-winsys-egl-kms-private.h
cogl-winsys-egl-kms.c Adds initial GLES2 integration support 2012-08-06 14:27:42 +01:00
cogl-winsys-egl-null-private.h
cogl-winsys-egl-null.c Adds initial GLES2 integration support 2012-08-06 14:27:42 +01:00
cogl-winsys-egl-private.h Adds initial GLES2 integration support 2012-08-06 14:27:42 +01:00
cogl-winsys-egl-wayland-private.h
cogl-winsys-egl-wayland.c Adds initial GLES2 integration support 2012-08-06 14:27:42 +01:00
cogl-winsys-egl-x11-private.h
cogl-winsys-egl-x11.c Adds initial GLES2 integration support 2012-08-06 14:27:42 +01:00
cogl-winsys-egl.c Don't use eglGetProcAddress to retrieve core functions 2012-08-06 14:27:45 +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 Don't use eglGetProcAddress to retrieve core functions 2012-08-06 14:27:45 +01:00
cogl-winsys-private.h Don't use eglGetProcAddress to retrieve core functions 2012-08-06 14:27:45 +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 Don't use eglGetProcAddress to retrieve core functions 2012-08-06 14:27:45 +01:00
cogl-winsys-stub-private.h
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
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 Don't use eglGetProcAddress to retrieve core functions 2012-08-06 14:27:45 +01:00
cogl-winsys.c Switch use of primitive glib types to c99 equivalents 2012-08-06 14:27:39 +01:00