I previously had an issue with OpenGL on Ubuntu using GLFW but managed to solve that by using the glfwWindowHints() method. Link for reference.
Now, I have stumbled upon yet another error, this time related to the fragment shader.
Failed to compile fragment shader!
0:60(12): error: `gl_FragColor' undeclared
0:60(2): error: no matching function for call to `mainImage(error, vec2)'; candidates are:
0:60(2): error: void mainImage(vec4, vec2)
Here is output of the command 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 - padoka PPA
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 - padoka PPA
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 - padoka PPA
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
In my shader files I have defined version as #version 450 core
.
I read on a forum elsewhere that the (12) in 0:60(12): error: 'gl_FragColor' undeclared
represented version 1.2, but I am not sure whether this is correct or not.
shader.frag - PasteBin
shader.vert - PasteBin