Skip to content

Make sure highest possible version GLContext is created

Benjamin Otte requested to merge wip/otte/gl-version into main

This MR does:

  1. Introduce GdkGLVersion as an internal object and makes all GL versions use it.

  2. 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.

  3. 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.

  4. Clean up backends to be stricter about their GL version correctness. In particular, some backends would sneakily ignore the required GL version.

Merge request reports