stevenlovegrove / Pangolin

Pangolin is a lightweight portable rapid development library for managing OpenGL display / interaction and abstracting video input.
MIT License
2.39k stars 854 forks source link

GLSL Program link failed: error: vertex shader lacks `main' #926

Closed StrongestBubble closed 6 months ago

StrongestBubble commented 6 months ago

I successfully compiled ElasticFusion on Ubuntu 20.04. However, when running "./ElasticFusion -l ../dyson_lab.klg", there was error as follows:

GLSL Program link failed: error: vertex shader lacks `main'

GLSL Program link failed: error: vertex shader lacks `main'

OpenGL Error 500: GL_INVALID_ENUM: An unacceptable value is specified for an enumerated argument.
In: /home/wenqing/SLAM/ElasticFusion/third-party/Pangolin/include/pangolin/gl/gl.hpp, line 205
GLSL Program link failed: error: vertex shader lacks `main'

GLSL Program link failed: error: vertex shader lacks `main'

GLSL Program link failed: error: vertex shader lacks `main'

OpenGL Error 500: GL_INVALID_ENUM: An unacceptable value is specified for an enumerated argument.
In: /home/wenqing/SLAM/ElasticFusion/third-party/Pangolin/include/pangolin/gl/gl.hpp, line 620
GLSL Program link failed: error: vertex shader lacks `main'

GLSL Program link failed: error: vertex shader lacks `main'

OpenGL Error 500: GL_INVALID_ENUM: An unacceptable value is specified for an enumerated argument.
In: /home/wenqing/SLAM/ElasticFusion/third-party/Pangolin/include/pangolin/gl/gl.hpp, line 205
GLSL Program link failed: error: vertex shader lacks `main'

GLSL Program link failed: error: vertex shader lacks `main'

GLSL Program link failed: error: vertex shader lacks `main'

GLSL Program link failed: error: vertex shader lacks `main'

GLSL Program link failed: error: vertex shader lacks `main'

GLSL Program link failed: error: vertex shader lacks `main'

GLSL Program link failed: error: vertex shader lacks `main'

GLSL Program link failed: error: vertex shader lacks `main'

OpenGL Error 500: GL_INVALID_ENUM: An unacceptable value is specified for an enumerated argument.
In: /home/wenqing/SLAM/ElasticFusion/third-party/Pangolin/include/pangolin/gl/gl.hpp, line 205
Segmentation fault (core dumped)

How to fix above problem? Thanks in advanced.

christian-rauch commented 6 months ago

Can you run the Pangolin examples without issues? This might just be an issues with the shaders of Elastic Fusion.

StrongestBubble commented 6 months ago

Can you run the Pangolin examples without issues? This might just be an issues with the shaders of Elastic Fusion. I run the Pangolin examples without issues.

Now I have fixed this issue. I used "sudo prime-select nvidia" CLI to make sure that running ElasticFusion on nVidia GPU. Moreover, one can check it by "glxinfo | grep OpenGL" CLI.

Thinks a lots!