mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 21:21:21 +00:00
gdk: Require EGL version 1.4 across the board
Mesa currently ships 1.5.
This commit is contained in:
parent
430b6f8fb1
commit
e4f0418003
@ -27,6 +27,13 @@
|
|||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
/* Version requirements for EGL contexts.
|
||||||
|
*
|
||||||
|
* If you add support for EGL to your backend, please require this.
|
||||||
|
*/
|
||||||
|
#define GDK_EGL_MIN_VERSION_MAJOR (1)
|
||||||
|
#define GDK_EGL_MIN_VERSION_MINOR (4)
|
||||||
|
|
||||||
#define GDK_GL_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_GL_CONTEXT, GdkGLContextClass))
|
#define GDK_GL_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_GL_CONTEXT, GdkGLContextClass))
|
||||||
#define GDK_IS_GL_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_GL_CONTEXT))
|
#define GDK_IS_GL_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_GL_CONTEXT))
|
||||||
#define GDK_GL_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_GL_CONTEXT, GdkGLContextClass))
|
#define GDK_GL_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_GL_CONTEXT, GdkGLContextClass))
|
||||||
|
@ -448,6 +448,16 @@ gdk_wayland_display_init_gl (GdkDisplay *display,
|
|||||||
_("Could not initialize EGL display"));
|
_("Could not initialize EGL display"));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
if (major < GDK_EGL_MIN_VERSION_MAJOR ||
|
||||||
|
(major == GDK_EGL_MIN_VERSION_MAJOR && minor < GDK_EGL_MIN_VERSION_MINOR))
|
||||||
|
{
|
||||||
|
eglTerminate (dpy);
|
||||||
|
g_set_error (error, GDK_GL_ERROR,
|
||||||
|
GDK_GL_ERROR_NOT_AVAILABLE,
|
||||||
|
_("EGL version %d.%d is too old. GTK requires %d.%d"),
|
||||||
|
major, minor, GDK_EGL_MIN_VERSION_MAJOR, GDK_EGL_MIN_VERSION_MINOR);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (!eglBindAPI (EGL_OPENGL_API))
|
if (!eglBindAPI (EGL_OPENGL_API))
|
||||||
{
|
{
|
||||||
|
@ -626,6 +626,17 @@ gdk_x11_display_init_egl (GdkX11Display *self,
|
|||||||
_("Could not initialize EGL display"));
|
_("Could not initialize EGL display"));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
if (major < GDK_EGL_MIN_VERSION_MAJOR ||
|
||||||
|
(major == GDK_EGL_MIN_VERSION_MAJOR && minor < GDK_EGL_MIN_VERSION_MINOR))
|
||||||
|
{
|
||||||
|
eglTerminate (dpy);
|
||||||
|
self->egl_display = NULL;
|
||||||
|
g_set_error (error, GDK_GL_ERROR,
|
||||||
|
GDK_GL_ERROR_NOT_AVAILABLE,
|
||||||
|
_("EGL version %d.%d is too old. GTK requires %d.%d"),
|
||||||
|
major, minor, GDK_EGL_MIN_VERSION_MAJOR, GDK_EGL_MIN_VERSION_MINOR);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (!gdk_x11_display_create_egl_config (self, force, out_visual, out_depth, error))
|
if (!gdk_x11_display_create_egl_config (self, force, out_visual, out_depth, error))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user