diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-05-15 17:25:27 +0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-05-28 13:08:25 +0400 |
commit | 57430aa4af740b995f848511cb8dac996ce1d792 (patch) | |
tree | 5c1235113af8c23ac4c74d1f3cb3fd7c6fdb1726 | |
parent | 529969b8d03970bae5feef8c69ebf5e0f521131c (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>
-rw-r--r-- | ui/gtk.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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; |