-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warning: OpenGL 3.2.0 is unsupported despite that my GPU should support up to OpenGL 4.6 #72
Comments
I've added some debug information, please could you check what the latest version (0.8.3) prints when run in a terminal? |
This is what I'm getting:
|
Looks like you aren't using OpenGL ES then. So either I could lower the minimum version for the warning (assuming the app still works for you?), or remove it completely. I imagine on GTK 4 it's safe to assume we have a relatively modern OpenGL. |
It still works as far as I can tell
Not necessarily. GTK 4 supports OpenGL ES 2.0 as its minimum. Not sure about "desktop" OpenGL. |
It seems like OpenGL 3.0 is the lowest "legacy" OpenGL version GTK 4 tries to pick (not sure what legacy means), OpenGL 3.2 is the lowest OpenGL version it tries to pick, and OpenGL ES 2.0 is the lowest OpenGL ES version: https://gitlab.gnome.org/GNOME/gtk/-/blob/cefb0a3eb8f9a52283ce4368ccc78425db0914b0/gdk/gdkglcontextprivate.h#L36-50 |
Okay, so I tried building GTK with this stupid patch applied: 4.6-required-opengl.patch.txt And after applying this, lo and behold:
As well as no warning in Plots: So I guess GTK just picks the lowest supported non-legacy version on my system. I really wonder why it wouldn't do this on other systems. |
Very interesting. Presumably it's due to some quirk in the NVIDIA driver. So I need to look into whether Plots really needs 3.3, or whether a lower version would be acceptable. We could also try using |
Does this look like what you had in mind: diff --git a/plots/graph.py b/plots/graph.py
index 9605bdb..2243584 100644
--- a/plots/graph.py
+++ b/plots/graph.py
@@ -35,6 +35,7 @@ class GraphArea(Gtk.GLArea):
def __init__(self):
super().__init__()
+ self.set_required_version(3, 3)
self.scale = self._target_scale = self.INIT_SCALE
self._translation = np.array([0, 0], 'f')
self.vertex_template = jinja_env.get_template('vertex.glsl') It does not seem to help unfortunately:
|
That's surprising. What if you request 4.6? |
Same result. Could it be that it has no affect since the Area already is realised when this is called? |
It's possible. Try printing |
diff --git a/plots/graph.py b/plots/graph.py
index 9605bdb..ec0d499 100644
--- a/plots/graph.py
+++ b/plots/graph.py
@@ -35,6 +35,8 @@ class GraphArea(Gtk.GLArea):
def __init__(self):
super().__init__()
+ self.set_required_version(4, 6)
+ print(self.get_realized())
self.scale = self._target_scale = self.INIT_SCALE
self._translation = np.array([0, 0], 'f')
self.vertex_template = jinja_env.get_template('vertex.glsl')
So I guess it isn't realised when this happens. Wonder what it could be then. |
My desktop is using a GTX 970 with the proprietary driver stack version 515.65.01. This should support OpenGL 4.6 according to glxinfo and I don't have any issues running games and such. Yet despite this, when I launch Plots I'm greeted by a message saying that OpenGL 3.2.0 is unsupported:
What could be causing this? I am using Plots 0.8.1 from Flathub for what it's worth, and other Flatpak apps don't seem to have issues with 3D acceleration (SuperTuxKart and Trigger Rally both work fine). Could it be that it's picking OpenGL ES 3.2 (and thus the 3.2.0 version number) for some reason? I'm reminded of this: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4687
The text was updated successfully, but these errors were encountered: