diff options
author | Benjamin Otte <otte@redhat.com> | 2021-10-07 17:59:17 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2021-10-08 03:31:07 +0200 |
commit | c6dd3c11fa03acfa87c61ad82c67cfec179c9041 (patch) | |
tree | f67d3005e0963e434acfbf5dfaa24d21a049e217 /gdk/gdkglcontext.h | |
parent | 76420d71461c1aa4f65e6d7ae186be8a8647d81a (diff) | |
download | gtk+-c6dd3c11fa03acfa87c61ad82c67cfec179c9041.tar.gz |
glcontext: Add GdkGLContext::allowed-apis
This allows specifying the GL APIs in a more comprehensive way than
gdk_gl_context_set_use_es().
Diffstat (limited to 'gdk/gdkglcontext.h')
-rw-r--r-- | gdk/gdkglcontext.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gdk/gdkglcontext.h b/gdk/gdkglcontext.h index dab3319429..8205d85339 100644 --- a/gdk/gdkglcontext.h +++ b/gdk/gdkglcontext.h @@ -30,6 +30,20 @@ G_BEGIN_DECLS +/** + * GdkGLAPI: + * @GDK_GL_API_GL: The OpenGL API + * @GDK_GL_API_GLES: The OpenGL ES API + * + * The list of the different APIs that GdkGLContext can potentially support. + * + * Since: 4.6 + */ +typedef enum { /*< underscore_name=GDK_GL_API >*/ + GDK_GL_API_GL = 1 << 0, + GDK_GL_API_GLES = 1 << 1 +} GdkGLAPI; + #define GDK_TYPE_GL_CONTEXT (gdk_gl_context_get_type ()) #define GDK_GL_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_GL_CONTEXT, GdkGLContext)) #define GDK_IS_GL_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_GL_CONTEXT)) @@ -76,6 +90,11 @@ void gdk_gl_context_set_forward_compatible (GdkGLContext * gboolean compatible); GDK_AVAILABLE_IN_ALL gboolean gdk_gl_context_get_forward_compatible (GdkGLContext *context); +GDK_AVAILABLE_IN_4_6 +void gdk_gl_context_set_allowed_apis (GdkGLContext *self, + GdkGLAPI apis); +GDK_AVAILABLE_IN_4_6 +GdkGLAPI gdk_gl_context_get_allowed_apis (GdkGLContext *self); GDK_AVAILABLE_IN_ALL void gdk_gl_context_set_use_es (GdkGLContext *context, int use_es); |