summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2015-02-12 17:30:42 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2015-02-12 17:51:31 +0000
commitd066e7541e63ea621ef983c31c1652d295150b12 (patch)
tree1665ef9c2099ea85bf52f640d3d9cbe89099dbaf
parentccc0eafbc335d6f422f12d118e69579226e440a3 (diff)
downloadgtk+-d066e7541e63ea621ef983c31c1652d295150b12.tar.gz
Remove GdkGLProfile
The existence of OpenGL implementations that do not provide the full core profile compatibility because of reasons beyond the technical, like llvmpipe not implementing floating point buffers, makes the existence of GdkGLProfile and documenting the fact that we use core profiles a bit harder. Since we do not have any existing profile except the default, we can remove the GdkGLProfile and its related API from GDK and GTK+, and sweep the whole thing under the carpet, while we wait for an extension that lets us ask for the most compatible profile possible. https://bugzilla.gnome.org/show_bug.cgi?id=744407
-rw-r--r--docs/reference/gdk/gdk3-sections.txt3
-rw-r--r--gdk/gdkglcontext.c75
-rw-r--r--gdk/gdkglcontext.h5
-rw-r--r--gdk/gdktypes.h16
-rw-r--r--gdk/mir/gdkmirglcontext.c13
-rw-r--r--gdk/wayland/gdkglcontext-wayland.c15
-rw-r--r--gdk/win32/gdkglcontext-win32.c116
-rw-r--r--gdk/x11/gdkglcontext-x11.c65
-rw-r--r--gdk/x11/gdkglcontext-x11.h1
-rw-r--r--gtk/gtkglarea.c80
-rw-r--r--gtk/gtkglarea.h5
11 files changed, 68 insertions, 326 deletions
diff --git a/docs/reference/gdk/gdk3-sections.txt b/docs/reference/gdk/gdk3-sections.txt
index 7335636bd5..8ef5d402aa 100644
--- a/docs/reference/gdk/gdk3-sections.txt
+++ b/docs/reference/gdk/gdk3-sections.txt
@@ -1300,9 +1300,6 @@ gdk_gl_context_set_debug_enabled
gdk_gl_context_get_debug_enabled
gdk_gl_context_set_forward_compatible
gdk_gl_context_get_forward_compatible
-GdkGLProfile
-gdk_gl_context_set_profile
-gdk_gl_context_get_profile
<SUBSECTION>
GdkGLError
diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c
index 1ffacca43f..1d88a48fc1 100644
--- a/gdk/gdkglcontext.c
+++ b/gdk/gdkglcontext.c
@@ -91,7 +91,6 @@ typedef struct {
GdkDisplay *display;
GdkWindow *window;
GdkGLContext *shared_context;
- GdkGLProfile profile;
int major;
int minor;
@@ -113,7 +112,6 @@ enum {
PROP_DISPLAY,
PROP_WINDOW,
- PROP_PROFILE,
PROP_SHARED_CONTEXT,
LAST_PROP
@@ -201,10 +199,6 @@ gdk_gl_context_set_property (GObject *gobject,
}
break;
- case PROP_PROFILE:
- gdk_gl_context_set_profile (GDK_GL_CONTEXT (gobject), g_value_get_enum (value));
- break;
-
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
}
@@ -232,10 +226,6 @@ gdk_gl_context_get_property (GObject *gobject,
g_value_set_object (value, priv->shared_context);
break;
- case PROP_PROFILE:
- g_value_set_enum (value, priv->profile);
- break;
-
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
}
@@ -295,22 +285,6 @@ gdk_gl_context_class_init (GdkGLContextClass *klass)
G_PARAM_STATIC_STRINGS);
/**
- * GdkGLContext:profile:
- *
- * The #GdkGLProfile of the context
- *
- * Since: 3.16
- */
- obj_pspecs[PROP_PROFILE] =
- g_param_spec_enum ("profile",
- P_("Profile"),
- P_("The GL profile the context was created for"),
- GDK_TYPE_GL_PROFILE,
- GDK_GL_PROFILE_DEFAULT,
- G_PARAM_READWRITE |
- G_PARAM_STATIC_STRINGS);
-
- /**
* GdkGLContext:shared-context:
*
* The #GdkGLContext that this context is sharing data with, or #NULL
@@ -735,55 +709,6 @@ gdk_gl_context_get_window (GdkGLContext *context)
}
/**
- * gdk_gl_context_set_profile:
- * @context: a #GdkGLContext
- * @profile: the profile for the context
- *
- * Sets the profile used when realizing the context.
- *
- * The #GdkGLContext must not be realized or made current prior to calling
- * this function.
- *
- * Since: 3.16
- */
-void
-gdk_gl_context_set_profile (GdkGLContext *context,
- GdkGLProfile profile)
-{
- GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
-
- g_return_if_fail (GDK_IS_GL_CONTEXT (context));
- g_return_if_fail (!priv->realized);
-
- if (priv->profile != profile)
- {
- priv->profile = profile;
-
- g_object_notify_by_pspec (G_OBJECT (context), obj_pspecs[PROP_PROFILE]);
- }
-}
-
-/**
- * gdk_gl_context_get_profile:
- * @context: a #GdkGLContext
- *
- * Retrieves the #GdkGLProfile set using gdk_gl_context_set_profile().
- *
- * Returns: a #GdkGLProfile
- *
- * Since: 3.16
- */
-GdkGLProfile
-gdk_gl_context_get_profile (GdkGLContext *context)
-{
- GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
-
- g_return_val_if_fail (GDK_IS_GL_CONTEXT (context), GDK_GL_PROFILE_DEFAULT);
-
- return priv->profile;
-}
-
-/**
* gdk_gl_context_get_shared_context:
* @context: a #GdkGLContext
*
diff --git a/gdk/gdkglcontext.h b/gdk/gdkglcontext.h
index 089d746c39..c9603ea762 100644
--- a/gdk/gdkglcontext.h
+++ b/gdk/gdkglcontext.h
@@ -71,11 +71,6 @@ void gdk_gl_context_set_forward_compatible (GdkGLContext *
gboolean compatible);
GDK_AVAILABLE_IN_3_16
gboolean gdk_gl_context_get_forward_compatible (GdkGLContext *context);
-GDK_AVAILABLE_IN_3_16
-void gdk_gl_context_set_profile (GdkGLContext *context,
- GdkGLProfile profile);
-GDK_AVAILABLE_IN_3_16
-GdkGLProfile gdk_gl_context_get_profile (GdkGLContext *context);
GDK_AVAILABLE_IN_3_16
gboolean gdk_gl_context_realize (GdkGLContext *context,
diff --git a/gdk/gdktypes.h b/gdk/gdktypes.h
index 1eb45c217c..1587ebf25a 100644
--- a/gdk/gdktypes.h
+++ b/gdk/gdktypes.h
@@ -434,22 +434,6 @@ struct _GdkPoint
};
/**
- * GdkGLProfile:
- * @GDK_GL_PROFILE_DEFAULT: The default profile.
- * @GDK_GL_PROFILE_3_2_CORE: Use the OpenGL core profile, with
- * a minimum required version of 3.2; this is the default
- * profile.
- *
- * The profile to be used when creating a #GdkGLContext.
- *
- * Since: 3.16
- */
-typedef enum {
- GDK_GL_PROFILE_DEFAULT,
- GDK_GL_PROFILE_3_2_CORE
-} GdkGLProfile;
-
-/**
* GdkGLError:
* @GDK_GL_ERROR_NOT_AVAILABLE: OpenGL support is not available
* @GDK_GL_ERROR_UNSUPPORTED_FORMAT: The requested visual format is not supported
diff --git a/gdk/mir/gdkmirglcontext.c b/gdk/mir/gdkmirglcontext.c
index e792577836..9506461f1c 100644
--- a/gdk/mir/gdkmirglcontext.c
+++ b/gdk/mir/gdkmirglcontext.c
@@ -35,7 +35,6 @@ gdk_mir_gl_context_realize (GdkGLContext *context,
GdkMirGLContext *context_mir = GDK_MIR_GL_CONTEXT (context);
GdkDisplay *display = gdk_gl_context_get_display (context);
GdkGLContext *share = gdk_gl_context_get_shared_context (context);
- GdkGLProfile profile = gdk_gl_context_get_profile (context);
EGLContext ctx;
EGLint context_attribs[N_EGL_ATTRS];
int major, minor, flags;
@@ -50,18 +49,6 @@ gdk_mir_gl_context_realize (GdkGLContext *context,
return FALSE;
}
- /* "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,
- GDK_GL_ERROR_UNSUPPORTED_PROFILE,
- _("Unsupported profile for a GL context"));
- return FALSE;
- }
-
gdk_gl_context_get_required_version (context, &major, &minor);
debug_bit = gdk_gl_context_get_debug_enabled (context);
forward_bit = gdk_gl_context_get_forward_compatible (context);
diff --git a/gdk/wayland/gdkglcontext-wayland.c b/gdk/wayland/gdkglcontext-wayland.c
index 45bca0ed04..395b497708 100644
--- a/gdk/wayland/gdkglcontext-wayland.c
+++ b/gdk/wayland/gdkglcontext-wayland.c
@@ -109,7 +109,6 @@ gdk_wayland_gl_context_realize (GdkGLContext *context,
GdkWaylandGLContext *context_wayland = GDK_WAYLAND_GL_CONTEXT (context);
GdkDisplay *display = gdk_gl_context_get_display (context);
GdkGLContext *share = gdk_gl_context_get_shared_context (context);
- GdkGLProfile profile = gdk_gl_context_get_profile (context);
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
EGLContext ctx;
EGLint context_attribs[N_EGL_ATTRS];
@@ -117,18 +116,6 @@ 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,
- GDK_GL_ERROR_UNSUPPORTED_PROFILE,
- _("Unsupported profile for a GL context"));
- return FALSE;
- }
-
gdk_gl_context_get_required_version (context, &major, &minor);
debug_bit = gdk_gl_context_get_debug_enabled (context);
forward_bit = gdk_gl_context_get_forward_compatible (context);
@@ -386,7 +373,7 @@ gdk_wayland_window_create_gl_context (GdkWindow *window,
{
g_set_error_literal (error, GDK_GL_ERROR,
GDK_GL_ERROR_UNSUPPORTED_PROFILE,
- _("3.2 core GL profile is not available on EGL implementation"));
+ _("Core GL is not available on EGL implementation"));
return NULL;
}
diff --git a/gdk/win32/gdkglcontext-win32.c b/gdk/win32/gdkglcontext-win32.c
index 55932b865c..d32e531e6b 100644
--- a/gdk/win32/gdkglcontext-win32.c
+++ b/gdk/win32/gdkglcontext-win32.c
@@ -390,48 +390,40 @@ _gdk_win32_display_init_gl (GdkDisplay *display,
static HGLRC
_create_gl_context (HDC hdc,
GdkGLContext *share,
- GdkGLProfile profile,
int flags,
int major,
int minor)
{
/* we still need a legacy WGL context first for all cases */
HGLRC hglrc_base;
+ /* This is the actual WGL context that we want */
+ HGLRC hglrc;
+ GdkWin32GLContext *context_win32;
- /* Create the WGL Core (3.2+) context, the legacy context *is* needed here */
- if (profile == GDK_GL_PROFILE_3_2_CORE)
- {
- /* This is the actual WGL context that we want */
- HGLRC hglrc;
- GdkWin32GLContext *context_win32;
+ gint attribs[] = {
+ WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB,
+ WGL_CONTEXT_MAJOR_VERSION_ARB, major,
+ WGL_CONTEXT_MINOR_VERSION_ARB, minor,
+ WGL_CONTEXT_FLAGS_ARB, flags,
+ 0
+ };
- gint attribs[] = {
- WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB,
- WGL_CONTEXT_MAJOR_VERSION_ARB, major,
- WGL_CONTEXT_MINOR_VERSION_ARB, minor,
- WGL_CONTEXT_FLAGS_ARB, flags,
- 0
- };
+ hglrc_base = wglCreateContext (hdc);
- hglrc_base = wglCreateContext (hdc);
+ if (!wglMakeCurrent (hdc, hglrc_base))
+ return NULL;
- if (!wglMakeCurrent (hdc, hglrc_base))
- return NULL;
+ if (share != NULL)
+ context_win32 = GDK_WIN32_GL_CONTEXT (share);
- if (share != NULL)
- context_win32 = GDK_WIN32_GL_CONTEXT (share);
+ hglrc = wglCreateContextAttribsARB (hdc,
+ share != NULL ? context_win32->hglrc : NULL,
+ attribs);
- hglrc = wglCreateContextAttribsARB (hdc,
- share != NULL ? context_win32->hglrc : NULL,
- attribs);
+ wglMakeCurrent (NULL, NULL);
+ wglDeleteContext (hglrc_base);
- wglMakeCurrent (NULL, NULL);
- wglDeleteContext (hglrc_base);
- return hglrc;
- }
- else
- /* Should not get here anyways, for now */
- return NULL;
+ return hglrc;
}
static gboolean
@@ -460,12 +452,12 @@ _gdk_win32_gl_context_realize (GdkGLContext *context,
GError **error)
{
GdkGLContext *share = gdk_gl_context_get_shared_context (context);
- GdkGLProfile profile = gdk_gl_context_get_profile (context);
GdkWin32GLContext *context_win32 = GDK_WIN32_GL_CONTEXT (context);
/* These are the real WGL context items that we will want to use later */
HGLRC hglrc;
gint pixel_format;
+ gboolean debug_bit, compat_bit;
if (!_set_pixformat_for_hdc (context_win32->gl_hdc,
&pixel_format,
@@ -477,50 +469,32 @@ _gdk_win32_gl_context_realize (GdkGLContext *context,
return FALSE;
}
- if (profile == GDK_GL_PROFILE_DEFAULT)
- profile = GDK_GL_PROFILE_3_2_CORE;
-
- if (profile == GDK_GL_PROFILE_3_2_CORE)
- {
- gboolean debug_bit, compat_bit;
-
- /* request flags and specific versions for core (3.2+) WGL context */
- gint flags = 0;
- gint glver_major = 0;
- gint glver_minor = 0;
-
- gdk_gl_context_get_required_version (context, &glver_major, &glver_minor);
- debug_bit = gdk_gl_context_get_debug_enabled (context);
- compat_bit = gdk_gl_context_get_forward_compatible (context);
- if (debug_bit)
- flags |= WGL_CONTEXT_DEBUG_BIT_ARB;
- if (compat_bit)
- flags |= WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;
+ /* request flags and specific versions for core (3.2+) WGL context */
+ gint flags = 0;
+ gint glver_major = 0;
+ gint glver_minor = 0;
- GDK_NOTE (OPENGL,
- g_print ("Creating core WGL context (version:%d.%d, debug:%s, forward:%s)\n",
- major, minor,
- debug_bit ? "yes" : "no",
- compat_bit ? "yes" : "no"));
-
- hglrc = _create_gl_context (context_win32->gl_hdc,
- share,
- profile,
- flags,
- glver_major,
- glver_minor);
- }
- else
- {
- g_set_error_literal (error,
- GDK_GL_ERROR,
- GDK_GL_ERROR_UNSUPPORTED_PROFILE,
- _("Unsupported profile for a GL context"));
+ gdk_gl_context_get_required_version (context, &glver_major, &glver_minor);
+ debug_bit = gdk_gl_context_get_debug_enabled (context);
+ compat_bit = gdk_gl_context_get_forward_compatible (context);
- return FALSE;
- }
+ if (debug_bit)
+ flags |= WGL_CONTEXT_DEBUG_BIT_ARB;
+ if (compat_bit)
+ flags |= WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;
+ GDK_NOTE (OPENGL,
+ g_print ("Creating core WGL context (version:%d.%d, debug:%s, forward:%s)\n",
+ major, minor,
+ debug_bit ? "yes" : "no",
+ compat_bit ? "yes" : "no"));
+
+ hglrc = _create_gl_context (context_win32->gl_hdc,
+ share,
+ flags,
+ glver_major,
+ glver_minor);
if (hglrc == NULL)
{
g_set_error_literal (error, GDK_GL_ERROR,
@@ -575,7 +549,7 @@ _gdk_win32_window_create_gl_context (GdkWindow *window,
g_set_error_literal (error, GDK_GL_ERROR,
GDK_GL_ERROR_UNSUPPORTED_PROFILE,
_("The WGL_ARB_create_context extension "
- "needed to create 3.2 core profiles is not "
+ "needed to create core profiles is not "
"available"));
return NULL;
}
diff --git a/gdk/x11/gdkglcontext-x11.c b/gdk/x11/gdkglcontext-x11.c
index 654fdafc6c..e2d70e9b73 100644
--- a/gdk/x11/gdkglcontext-x11.c
+++ b/gdk/x11/gdkglcontext-x11.c
@@ -581,59 +581,37 @@ gdk_x11_gl_context_realize (GdkGLContext *context,
XVisualInfo *xvisinfo;
Display *dpy;
DrawableInfo *info;
- GdkGLProfile profile;
GdkGLContext *share;
GdkWindow *window;
+ gboolean debug_bit, compat_bit;
+ int major, minor, flags;
window = gdk_gl_context_get_window (context);
display = gdk_window_get_display (window);
dpy = gdk_x11_display_get_xdisplay (display);
context_x11 = GDK_X11_GL_CONTEXT (context);
- profile = gdk_gl_context_get_profile (context);
share = gdk_gl_context_get_shared_context (context);
- /* default means 3.2 core profile */
- if (profile == GDK_GL_PROFILE_DEFAULT)
- profile = GDK_GL_PROFILE_3_2_CORE;
+ gdk_gl_context_get_required_version (context, &major, &minor);
+ debug_bit = gdk_gl_context_get_debug_enabled (context);
+ compat_bit = gdk_gl_context_get_forward_compatible (context);
- /* we check for the presence of the GLX_ARB_create_context_profile
- * extension before checking for a GLXFBConfig when creating the
- * GdkX11GLContext instance in gdk_x11_window_create_gl_context().
- */
- if (profile == GDK_GL_PROFILE_3_2_CORE)
- {
- gboolean debug_bit, compat_bit;
- int major, minor, flags;
-
- gdk_gl_context_get_required_version (context, &major, &minor);
- debug_bit = gdk_gl_context_get_debug_enabled (context);
- compat_bit = gdk_gl_context_get_forward_compatible (context);
-
- flags = 0;
- if (debug_bit)
- flags |= GLX_CONTEXT_DEBUG_BIT_ARB;
- if (compat_bit)
- flags |= GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;
-
- GDK_NOTE (OPENGL,
- g_print ("Creating core GLX context (version:%d.%d, debug:%s, forward:%s)\n",
- major, minor,
- debug_bit ? "yes" : "no",
- compat_bit ? "yes" : "no"));
-
- context_x11->glx_context = create_gl3_context (display,
- context_x11->glx_config,
- share,
- flags, major, minor);
- }
- else
- {
- g_set_error_literal (error, GDK_GL_ERROR,
- GDK_GL_ERROR_UNSUPPORTED_PROFILE,
- _("Unsupported profile for a GL context"));
- return FALSE;
- }
+ flags = 0;
+ if (debug_bit)
+ flags |= GLX_CONTEXT_DEBUG_BIT_ARB;
+ if (compat_bit)
+ flags |= GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;
+ GDK_NOTE (OPENGL,
+ g_print ("Creating core GLX context (version:%d.%d, debug:%s, forward:%s)\n",
+ major, minor,
+ debug_bit ? "yes" : "no",
+ compat_bit ? "yes" : "no"));
+
+ context_x11->glx_context = create_gl3_context (display,
+ context_x11->glx_config,
+ share,
+ flags, major, minor);
if (context_x11->glx_context == NULL)
{
g_set_error_literal (error, GDK_GL_ERROR,
@@ -1191,8 +1169,7 @@ gdk_x11_window_create_gl_context (GdkWindow *window,
g_set_error_literal (error, GDK_GL_ERROR,
GDK_GL_ERROR_UNSUPPORTED_PROFILE,
_("The GLX_ARB_create_context_profile extension "
- "needed to create 3.2 core profiles is not "
- "available"));
+ "needed to create core profiles is not available"));
return NULL;
}
diff --git a/gdk/x11/gdkglcontext-x11.h b/gdk/x11/gdkglcontext-x11.h
index 7e90801572..44cb0d5eb9 100644
--- a/gdk/x11/gdkglcontext-x11.h
+++ b/gdk/x11/gdkglcontext-x11.h
@@ -40,7 +40,6 @@ struct _GdkX11GLContext
{
GdkGLContext parent_instance;
- GdkGLProfile profile;
GLXContext glx_context;
GLXFBConfig glx_config;
GLXDrawable drawable;
diff --git a/gtk/gtkglarea.c b/gtk/gtkglarea.c
index bea76a9339..f843271735 100644
--- a/gtk/gtkglarea.c
+++ b/gtk/gtkglarea.c
@@ -98,7 +98,6 @@
*/
typedef struct {
- GdkGLProfile profile;
GdkGLContext *context;
GdkWindow *event_window;
GError *error;
@@ -125,7 +124,6 @@ enum {
PROP_0,
PROP_CONTEXT,
- PROP_PROFILE,
PROP_HAS_ALPHA,
PROP_HAS_DEPTH_BUFFER,
PROP_HAS_STENCIL_BUFFER,
@@ -188,10 +186,6 @@ gtk_gl_area_set_property (GObject *gobject,
gtk_gl_area_set_has_stencil_buffer (self, g_value_get_boolean (value));
break;
- case PROP_PROFILE:
- gtk_gl_area_set_profile (self, g_value_get_enum (value));
- break;
-
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
}
@@ -227,10 +221,6 @@ gtk_gl_area_get_property (GObject *gobject,
g_value_set_object (value, priv->context);
break;
- case PROP_PROFILE:
- g_value_set_enum (value, priv->profile);
- break;
-
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
}
@@ -312,7 +302,6 @@ gtk_gl_area_real_create_context (GtkGLArea *area)
gdk_gl_context_set_required_version (context,
priv->required_gl_version / 10,
priv->required_gl_version % 10);
- gdk_gl_context_set_profile (context, priv->profile);
gdk_gl_context_realize (context, &error);
if (priv->error != NULL)
@@ -736,24 +725,6 @@ gtk_gl_area_class_init (GtkGLAreaClass *klass)
G_PARAM_STATIC_STRINGS);
/**
- * GdkGLArea:profile:
- *
- * The #GdkGLProfile to use to create the GL context for the area.
- *
- * Since: 3.16
- */
- obj_props[PROP_PROFILE] =
- g_param_spec_enum ("profile",
- P_("Profile"),
- P_("The GL profile to use for the GL context"),
- GDK_TYPE_GL_PROFILE,
- GDK_GL_PROFILE_DEFAULT,
- G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT |
- G_PARAM_EXPLICIT_NOTIFY |
- G_PARAM_STATIC_STRINGS);
-
- /**
* GtkGLArea:auto-render:
*
* If set to %TRUE the #GtkGLArea::render signal will be emitted every time
@@ -899,7 +870,7 @@ gtk_gl_area_class_init (GtkGLAreaClass *klass)
* realized, and allows you to override how the GL context is
* created. This is useful when you want to reuse an existing GL
* context, or if you want to try creating different kinds of GL
- * profiles.
+ * options.
*
* If context creation fails then the signal handler can use
* gtk_gl_area_set_error() to register a more detailed error
@@ -928,7 +899,6 @@ gtk_gl_area_init (GtkGLArea *area)
gtk_widget_set_has_window (GTK_WIDGET (area), FALSE);
gtk_widget_set_app_paintable (GTK_WIDGET (area), TRUE);
- priv->profile = GDK_GL_PROFILE_DEFAULT;
priv->auto_render = TRUE;
priv->needs_render = TRUE;
priv->required_gl_version = 0;
@@ -1044,54 +1014,6 @@ gtk_gl_area_get_required_version (GtkGLArea *area,
}
/**
- * gtk_gl_area_get_profile:
- * @area: a #GtkGLArea
- *
- * Returns the profile that will be used to create the GL context for the area.
- *
- * Returns: a #GdkGLProfile
- *
- * Since: 3.16
- */
-GdkGLProfile
-gtk_gl_area_get_profile (GtkGLArea *area)
-{
- GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area);
-
- g_return_val_if_fail (GTK_IS_GL_AREA (area), FALSE);
-
- return priv->profile;
-}
-
-/**
- * gtk_gl_area_set_profile:
- * @area: a #GtkGLArea
- * @profile: a #GdkGLProfile
- *
- * Sets the profile type to be used when creating the context for the widget.
- *
- * This function must be called before the area has been realized.
- *
- * Since: 3.16
- */
-void
-gtk_gl_area_set_profile (GtkGLArea *area,
- GdkGLProfile profile)
-{
- GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area);
-
- g_return_if_fail (GTK_IS_GL_AREA (area));
- g_return_if_fail (!gtk_widget_get_realized (GTK_WIDGET (area)));
-
- if (priv->profile != profile)
- {
- priv->profile = profile;
-
- g_object_notify (G_OBJECT (area), "profile");
- }
-}
-
-/**
* gtk_gl_area_get_has_alpha:
* @area: a #GtkGLArea
*
diff --git a/gtk/gtkglarea.h b/gtk/gtkglarea.h
index e7e47c8162..86e87cabfa 100644
--- a/gtk/gtkglarea.h
+++ b/gtk/gtkglarea.h
@@ -92,11 +92,6 @@ void gtk_gl_area_get_required_version (GtkGLArea *area,
int *major,
int *minor);
GDK_AVAILABLE_IN_3_16
-GdkGLProfile gtk_gl_area_get_profile (GtkGLArea *area);
-GDK_AVAILABLE_IN_3_16
-void gtk_gl_area_set_profile (GtkGLArea *area,
- GdkGLProfile profile);
-GDK_AVAILABLE_IN_3_16
gboolean gtk_gl_area_get_has_alpha (GtkGLArea *area);
GDK_AVAILABLE_IN_3_16
void gtk_gl_area_set_has_alpha (GtkGLArea *area,