Make sure highest possible version GLContext is created
This MR does:
-
Introduce
GdkGLVersion
as an internal object and makes all GL versions use it. -
Changes all GL context creation code to try creation with all versions from highest to lowest until one succeeds. This way, GL drivers don't have the freedom to choose a lower version - which the specs give them, but some, most importantly Mesa, still return the highest version while others, most importantly Windows, don't.
-
Set the GL version right after creation to the version the GL context was actually created in. That is more accurate than calling into epoxy some time later.
-
Clean up backends to be stricter about their GL version correctness. In particular, some backends would sneakily ignore the required GL version.