alexhuntley / Plots

A graph plotting app for GNOME
GNU General Public License v3.0
189 stars 36 forks source link

Shader compile failure: GLSL 3.30 is not supported #151

Open Kimiblock opened 1 month ago

Kimiblock commented 1 month ago

Arch Linux

AUR plots-git 0.8.5.r68.gf545ac4-1

OpenGL ES version: 3.2
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/plots/graph.py", line 129, in gl_realize
    self.vertex_shader = shaders.compileShader(
                         ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/OpenGL/GL/shaders.py", line 235, in compileShader
    raise ShaderCompilationError(
OpenGL.GL.shaders.ShaderCompilationError: ("Shader compile failure (0): b'0:20(10): error: GLSL 3.30 is not supported. Supported versions are: 1.00 ES, 3.00 ES, 3.10 ES, and 3.20 ES\\n'", [b'/*\n   Copyright 2021 Alexander Huntley\n\n   This file is part of Plots.\n\n   Plots is free software: you can redistribute it and/or modify\n   it under the terms of the GNU General Public License as published by\n   the Free Software Foundation, either version 3 of the License, or\n   (at your option) any later version.\n\n   Plots is distributed in the hope that it will be useful,\n   but WITHOUT ANY WARRANTY; without even the implied warranty of\n   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n   GNU General Public License for more details.\n\n   You should have received a copy of the GNU General Public License\n   along with Plots.  If not, see <https://www.gnu.org/licenses/>.\n*/\n\n#version 330 core\nlayout (location = 0) in vec3 position;\nout vec2 graph_pos;\nuniform vec2 viewport;\nuniform vec2 translation;\nuniform float scale;\n\nvoid main() {\n    gl_Position = vec4(position, 1.0);\n    vec2 normalised = position.xy * viewport / viewport.x;\n    graph_pos = normalised*scale - translation;\n}'], GL_VERTEX_SHADER)
Kimiblock commented 1 month ago

A workaround is to set GDK_DEBUG=gl-prefer-gl