aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2023-05-15 17:25:27 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-05-28 13:08:25 +0400
commit57430aa4af740b995f848511cb8dac996ce1d792 (patch)
tree5c1235113af8c23ac4c74d1f3cb3fd7c6fdb1726 /ui
parent529969b8d03970bae5feef8c69ebf5e0f521131c (diff)
gtk: add gl-area support on win32
On Windows, we don't use the low-level GBM/EGL helpers (no dmabuf etc), we can turn on GL area support for the rest of rendering. (fwiw, GDK backend may be either WGL or EGL) Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Tested-by: Bernhard Beschow <shentey@gmail.com> Message-Id: <20230515132527.1026064-1-marcandre.lureau@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/gtk.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/gtk.c b/ui/gtk.c
index 0a9f24ee0a..2b7268124f 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -2444,6 +2444,12 @@ static void early_gtk_display_init(DisplayOptions *opts)
gtk_gl_area_init();
} else
#endif
+#if defined(GDK_WINDOWING_WIN32)
+ if (GDK_IS_WIN32_DISPLAY(gdk_display_get_default())) {
+ gtk_use_gl_area = true;
+ gtk_gl_area_init();
+ } else
+#endif
{
#ifdef CONFIG_X11
DisplayGLMode mode = opts->has_gl ? opts->gl : DISPLAYGL_MODE_ON;