friture
friture copied to clipboard
Open GL shader compile failure
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! :)
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