I am currently working on a project using OpenGL on Ubuntu 16.04 and have run into a major issue. At this point I have no idea what to do as it feels like I have tried everything in order to fix this.
For some reason my shader just won't compile and returns the following error:
Failed to compile vertex shader!
0:1(10): error: GLSL 4.50 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, 3.00 ES, 3.10 ES, and 3.20 ES`
I have adjusted the version in the shader file without any luck. #version 450 core
etc. but I keep getting the same result.
For reference, here is the output of sudo glxinfo | grep "OpenGL"
:
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 13.1.0-devel
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 13.1.0-devel
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 13.1.0-devel
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
The output from glxinfo shows OpenGL core 4.5 is installed, so why is this not supported?
I have also tried to find the current version of OpenGL used in the project: std::cout << "OpenGL version: " << glGetString(GL_VERSION) << std::endl;
which results in a blank return.
I have spent 10 hours on this single issue until now, so any help is appreciated!
Edit: Is there a way to force the project/Ubuntu to use OpenGL and not GLSL by i.e. removing GLSL completely (this part)?
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 13.1.0-devel
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions: