diff options
author | Benjamin Otte <otte@redhat.com> | 2021-07-07 04:40:34 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2021-07-22 16:27:32 +0200 |
commit | 9f1d6e1f4474707aa9931660da6c3154b2281705 (patch) | |
tree | 3c3a08a86fab2fa8d3f56f2c805e5c15b800f9de /gdk/gdkglcontextprivate.h | |
parent | 15ed1a329e2f4939b239d0845f3200df1cdcdd7e (diff) | |
download | gtk+-9f1d6e1f4474707aa9931660da6c3154b2281705.tar.gz |
gl: Move vfunc
Instead of
Display::make_gl_context_current()
we now have
GLContext::clear_current()
GLContext::make_current()
This fits better with the backends (we can actually implement
clearCurrent on macOS now) and makes it easier to implement different GL
backends for backends (like EGL/GLX on X11).
We also pass a surfaceless boolean to make_current() so the calling code
can decide if a surface needs to be bound or not, because the backends
were all doing whatever, which was very counterproductive.
Diffstat (limited to 'gdk/gdkglcontextprivate.h')
-rw-r--r-- | gdk/gdkglcontextprivate.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdk/gdkglcontextprivate.h b/gdk/gdkglcontextprivate.h index b64a6f4510..a338d7cbbe 100644 --- a/gdk/gdkglcontextprivate.h +++ b/gdk/gdkglcontextprivate.h @@ -55,6 +55,9 @@ struct _GdkGLContextClass gboolean (* realize) (GdkGLContext *context, GError **error); + gboolean (* make_current) (GdkGLContext *context, + gboolean surfaceless); + gboolean (* clear_current) (GdkGLContext *context); cairo_region_t * (* get_damage) (GdkGLContext *context); gboolean (* is_shared) (GdkGLContext *self, |