diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2015-02-12 12:34:28 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2015-02-12 12:34:28 +0000 |
commit | 022724aa69bbf1c65768b87d0f3e319257284b40 (patch) | |
tree | 70a133c4ed74584e3a875b173a6fa7bdd383ef51 /gdk/wayland/gdkglcontext-wayland.c | |
parent | 015bf99816969cff366e201169e6c54fd8b3cf3d (diff) | |
download | gtk+-022724aa69bbf1c65768b87d0f3e319257284b40.tar.gz |
gl: Drop profile for gdk_window_create_gl_context()
Now that we have a two-stages GL context creation sequence, we can move
the profile to a pre-realize option, like the debug and forward
compatibility bits, or the GL version to use.
Diffstat (limited to 'gdk/wayland/gdkglcontext-wayland.c')
-rw-r--r-- | gdk/wayland/gdkglcontext-wayland.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gdk/wayland/gdkglcontext-wayland.c b/gdk/wayland/gdkglcontext-wayland.c index 5f3ddfb654..45bca0ed04 100644 --- a/gdk/wayland/gdkglcontext-wayland.c +++ b/gdk/wayland/gdkglcontext-wayland.c @@ -117,6 +117,10 @@ gdk_wayland_gl_context_realize (GdkGLContext *context, gboolean debug_bit, forward_bit; int i = 0; + /* default profile means 3.2 core profile */ + if (profile == GDK_GL_PROFILE_DEFAULT) + profile = GDK_GL_PROFILE_3_2_CORE; + if (profile != GDK_GL_PROFILE_3_2_CORE) { g_set_error_literal (error, GDK_GL_ERROR, @@ -362,7 +366,6 @@ find_eglconfig_for_window (GdkWindow *window, GdkGLContext * gdk_wayland_window_create_gl_context (GdkWindow *window, gboolean attached, - GdkGLProfile profile, GdkGLContext *share, GError **error) { @@ -379,11 +382,7 @@ gdk_wayland_window_create_gl_context (GdkWindow *window, return NULL; } - if (profile == GDK_GL_PROFILE_DEFAULT) - profile = GDK_GL_PROFILE_3_2_CORE; - - if (profile == GDK_GL_PROFILE_3_2_CORE && - !display_wayland->have_egl_khr_create_context) + if (!display_wayland->have_egl_khr_create_context) { g_set_error_literal (error, GDK_GL_ERROR, GDK_GL_ERROR_UNSUPPORTED_PROFILE, @@ -397,7 +396,6 @@ gdk_wayland_window_create_gl_context (GdkWindow *window, context = g_object_new (GDK_TYPE_WAYLAND_GL_CONTEXT, "display", display, "window", window, - "profile", profile, "shared-context", share, NULL); |