Skip to content

Windows: Some fixes to GL context realization (EGL/GLES in particular)

Chun-wei Fan requested to merge win32-gl-improvements into main


This MR attempts to improve the GL renderer on Windows by:

  • Ensuring that we use the GL renderer by default, since now the shaders are working with GLES+ 3.0 contexts.
  • Make sure that we create EGL contexts that have OpenGL/ES versions and GL API set support that match the ones that we support with the EGL contexts that we attempt to share with them. The gtkglgears and glarea demos now work under OpenGL/ES on Windows via libANGLE.
  • Clean up EGL/WGL context creation on Windows a bit, where we record the GL context type in a clearer and more robust way, and for WGL, we just create a WGL context that matches the version that is returned by epoxy_gl_version(), so that we have the maximum WGL version supported by the driver when we create the (W)GL context.

With blessings, thank you!

Merge request reports