Fix running GTK4 under EGL on Windows
Hi,
This attempts to update the code so that one can at least launch GTK-4.x programs under Windows using EGL/libANGLE, where we:
- Use the non-legacy, non-GLES codepath
but avoid using. Using thenoperspective
in the shaders when we are using#version 300 es
in our shaders#version 300 es
directive instead of the usual#version 100
directive that we use for EGL is necessary for the shaders to compile and work successfully when used under libANGLE. - Make sure that we call
gdk_surface_set_egl_native_window()
when we create and destroy theGdkSurface
in Windows. - Check in GSK that we are going to use the GLSL 300 ES codepath if we are using a
libANGLEGLES 3.0+ GL renderer.
The gtk4-demo now launches and runs in EGL mode, albeit some of the GL demos are currently not working as it seems that some GL features were not supported or so (which, is beyond this MR IMO).
With blessings, thank you!