After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 773180 - Don't second-guess whether our GDK GL context is GLES
Don't second-guess whether our GDK GL context is GLES
Product: gtk+
Classification: Platform
Component: .General
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
Depends on:
Reported: 2016-10-18 19:32 UTC by Adam Jackson
Modified: 2016-10-23 20:27 UTC
See Also:
GNOME target: ---
GNOME version: ---

0001-gdk-Don-t-second-guess-whether-a-context-is-GLES.patch (842 bytes, patch)
2016-10-18 19:32 UTC, Adam Jackson
committed Details | Review
gdk/gl: Allow autodetection for GL/GLES (3.67 KB, patch)
2016-10-19 12:50 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review
gdk/gl: fix truth value of negative use_es (737 bytes, patch)
2016-10-23 19:27 UTC, Lukas
none Details | Review

Description Adam Jackson 2016-10-18 19:32:23 UTC
Created attachment 337967 [details] [review]

We've already set ->use_es correctly at context creation time, all this can possibly do is change our mind about what kind of GL we're using.
Comment 1 Emmanuele Bassi (:ebassi) 2016-10-19 12:20:12 UTC
Review of attachment 337967 [details] [review]:

That's fair.
Comment 2 Emmanuele Bassi (:ebassi) 2016-10-19 12:42:28 UTC
Actually, wait.

The original idea — which I never got around to implement — was to make use-es a tri-state:

 * -1: use epoxy_is_desktop_gl() (default)
 * 0: use desktop GL
 * 1: use GLES

This would at least allow some sort of auto-detection for GTK+ applications that do not have a configure-time setting that decides which GL API to use.
Comment 3 Emmanuele Bassi (:ebassi) 2016-10-19 12:50:42 UTC
Created attachment 338016 [details] [review]
gdk/gl: Allow autodetection for GL/GLES

If the GdkGLContext was not explicitly instructed to use or not GLES, we
can detect whether the underlying API is going to be desktop GL or GLES.
Comment 4 Matthias Clasen 2016-10-21 15:40:24 UTC
Attachment 338016 [details] pushed as b878ec7 - gdk/gl: Allow autodetection for GL/GLES
Comment 5 Lukas 2016-10-23 19:27:58 UTC
Created attachment 338302 [details] [review]
gdk/gl: fix truth value of negative use_es

The introduction of negative use_es values in had some unexpected side effectes: Negative use_es evaluate to true when they shouldn't.

Not sure whether this patch really does what we want, but it makes GLAreas work again.
Comment 6 Emmanuele Bassi (:ebassi) 2016-10-23 20:27:12 UTC
(In reply to Lukas from comment #5)
> Created attachment 338302 [details] [review] [review]
> gdk/gl: fix truth value of negative use_es

Thanks, but it would be best to have a separate bug report.

See bug 773397.