Commit Graph

3 Commits

Author SHA1 Message Date
Benjamin Otte
4333d754b8 gdk: Add workaround for Visual Studio
apparently casting something to itself makes it not constant.
2023-04-27 02:13:33 +02:00
Benjamin Otte
34662fc4b0 egl: Make sure highest possible GL version is created
The EGL spec states:

    The context returned must be the specified version, or a later
    version which is backwards compatible with that version.
    Even if a later version is returned, the specified version
    must correspond to a defined version of the client API.

GTK has so far been relying on EGL implementations returning a
later version, because that is what Mesa does.
But ANGLE does not do that and only provides the minimum version, which
means Windows EGL has been forced to use a lower EGL version for no
reason.

So fix this and try versions in order from highest to lowest.
2023-04-27 02:13:32 +02:00
Benjamin Otte
f86429177a gdk: Introduce GdkGLVersion
... and use it.

Makes the code simpler.
2023-04-27 02:13:32 +02:00