friture icon indicating copy to clipboard operation
friture copied to clipboard

Open GL shader compile failure

Open pauljerem opened this issue 3 years ago • 1 comments

Hi,

When trying to run main.py on Ubuntu 18.04, I get the following error:

2021-04-30, 12:28:04 (Friture 0.45)
Traceback (most recent call last):
  File "/home/jetson/friture/friture/plotting/glCanvasWidget.py", line 230, in initializeGL
    quad_vertex_shader = GL.shaders.compileShader(vertex_shader_source, GL.GL_VERTEX_SHADER)
  File "/home/jetson/friture/lib/python3.9/site-packages/OpenGL/GL/shaders.py", line 235, in compileShader
    raise ShaderCompilationError(
OpenGL.GL.shaders.ShaderCompilationError: ('Shader compile failure (0): b"0(13) : error C7614: OpenGL/ES doesn\'t allow use of reserved word gl_Vertex\\n"', [b'\n            #version 110\n\n            // input\n            attribute vec3 in_color;\n            uniform mat4 mvp;\n\n            // output\n            varying vec3 out_color;\n\n            void main()\n            {\n                gl_Position = mvp * gl_Vertex;\n                out_color = in_color;\n            }'], GL_VERTEX_SHADER)

Contents of friture.log.txt available here.

Any ideas on how to resolve this would be appreciated! :)

pauljerem avatar Apr 30 '21 10:04 pauljerem

Hi @pauljerem, sorry for taking so long to respond...

The error indicates the OpenGL/ES is used, whereas Friture normally uses OpenGL 3 (the Desktop version). From the full log file, it looks like you're running on a nvidia Tegra X1, which should support both. It seems like the issue is that Friture is not taking any step to request one particular profile rather than the other. I'll see if this can be adjusted.

Relevant reference: https://doc.qt.io/qt-5/qopenglwidget.html#details

tlecomte avatar Jul 25 '21 15:07 tlecomte