diff options
author | Matthias Clasen <mclasen@redhat.com> | 2014-11-06 23:29:16 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2014-11-06 23:29:16 -0500 |
commit | 5d0d1e524e6b6a6e190cbbf48d467ed80ee9118f (patch) | |
tree | 09497e3bae887dc3c10775748525a5f10ba6f5d9 /gdk/gdkglcontext.c | |
parent | d859cf19f67d33ee4a730c53e8d5de4b34da4987 (diff) | |
download | gtk+-5d0d1e524e6b6a6e190cbbf48d467ed80ee9118f.tar.gz |
Export API to set GL flags
This will be used in the inspector.
Diffstat (limited to 'gdk/gdkglcontext.c')
-rw-r--r-- | gdk/gdkglcontext.c | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c index e1b8f98e78..f9c874f6ee 100644 --- a/gdk/gdkglcontext.c +++ b/gdk/gdkglcontext.c @@ -380,14 +380,14 @@ gdk_gl_context_realize (GdkGLContext *context) priv->has_gl_framebuffer_blit = epoxy_has_gl_extension ("GL_EXT_framebuffer_blit"); priv->has_frame_terminator = epoxy_has_gl_extension ("GL_GREMEDY_frame_terminator"); - if (_gdk_gl_flags & GDK_GL_FLAGS_TEXTURE_RECTANGLE) + if (_gdk_gl_flags & GDK_GL_TEXTURE_RECTANGLE) priv->use_texture_rectangle = TRUE; else if (has_npot) priv->use_texture_rectangle = FALSE; else if (has_texture_rectangle) priv->use_texture_rectangle = TRUE; else - g_warning ("Gl implementation doesn't support any form of non-power-of-two textures"); + g_warning ("GL implementation doesn't support any form of non-power-of-two textures"); priv->realized = TRUE; } @@ -543,3 +543,32 @@ gdk_gl_context_get_current (void) return current; } + +/** + * gdk_gl_get_flags: + * + * Returns the currently active GL flags. + * + * Returns: the GL flags + * + * Since: 3.16 + */ +GdkGLFlags +gdk_gl_get_flags (void) +{ + return _gdk_gl_flags; +} + +/** + * gdk_gl_set_flags: + * @flags: #GdkGLFlags to set + * + * Sets GL flags. + * + * Since: 3.16 + */ +void +gdk_gl_set_flags (GdkGLFlags flags) +{ + _gdk_gl_flags = flags; +} |