Note: I wasn't 100% certain if this question belonged here or in Ask Ubuntu. I figured since it was about OpenGL programming I'd put it here, but if I should move it to Ask Ubuntu, please let me know.
I'm new to OpenGL and needed to figure out which version I could program in on my PC. A few Google/Stack Exchange searches shows that the usual solution is to run
glxinfo | grep version and read the results, which I did and got the following:
server glx version string: 1.4 client glx version string: 1.4 GLX version: 1.4 Max core profile version: 4.5 Max compat profile version: 3.0 Max GLES1 profile version: 1.1 Max GLES profile version: 3.2 OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.0.5 OpenGL core profile shading language version string: 4.50 OpenGL version string: 3.0 Mesa 18.0.5 OpenGL shading language version string: 1.30 OpenGL ES profile version string: OpenGL ES 3.2 Mesa 18.0.5 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
The confusing part is the following three lines:
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.0.5 OpenGL version string: 3.0 Mesa 18.0.5 OpenGL shading language version string: 1.30
Everything I've read says to focus only on the Core Profile line, but I'm unable to draw anything unless I load functions and create a context under 3.0 or lower. Plus, when I call
glGetString(GL_VERSION) I get
3.0 Mesa 18.0.5 printed to the terminal, but I'm not sure if that's because my hardware only supports 3.0 or if that's because I loaded functions for that level. Also, when I start writing shaders (I'm currently using Qt and an OpenGL Widget so haven't made a shader of my own yet) will I only be able to use GLSL 1.3 instead of 3.0+?
My big question is, what do the output strings actually mean? I can't find that answer. Which one tells me what my hardware can actually do? And, what do the other strings mean? Why am I getting a Core Profile of 4.5 when (as far as I can tell) I can't actually use 4.5? If my hardware can perform 4.5 operations, how do I make it do so?