gdk: use GLES when on win32/ANGLE
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 13 Apr 2023 15:22:21 +0000 (19:22 +0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 21 Apr 2023 07:28:51 +0000 (09:28 +0200)
When using GDK_DEBUG=gl-egl, we end up using GL, but that is not well supported:

Creating EGL context version 3.0 (debug:no, forward:no, legacy:yes, es:no)
Created EGL context[0000000000000004]
OpenGL version: 0.0 (legacy)
* GLSL version: (NULL)
* Max texture size: -1059701680
* Extensions checked:
 - GL_KHR_debug: no
 - GL_EXT_unpack_subimage: yes
 - OES_vertex_half_float: no

** (gtk4-demo.exe:14324): WARNING **: 19:16:41.468: Compile failure in
vertex shader:
ERROR: 0:7: 'gl_Position' : undeclared identifier
---8<---

Use GLES when EGL implementation is ANGLE.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
gdk/win32/gdkdisplay-win32.c

index 5c53f247c264f4bce8d3c41e949b7e7ec5032e9d..d07a1c09cbf62e9b809456b2a60fed36482c041d 100644 (file)
@@ -1207,6 +1207,7 @@ gdk_win32_display_init_gl (GdkDisplay  *display,
         {
           return g_object_new (GDK_TYPE_WIN32_GL_CONTEXT_EGL,
                                "display", display,
+                               "allowed-apis", GDK_GL_API_GLES,
                                NULL);
         }
       else