I'm trying to figure out my OpenGL version. I'm running a Fedora 29 vmware guest in win10 host. If I use software rendering (through Mesa), I get
$ LIBGL_ALWAYS_SOFTWARE=1 GALLIUM_DRIVE=softpipe glxinfo | grep OpenGL OpenGL vendor string: VMware, Inc. OpenGL renderer string: llvmpipe (LLVM 7.0, 256 bits) OpenGL core profile version string: 3.3 (Core Profile) Mesa 18.3.6 OpenGL core profile shading language version string: 3.30 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile OpenGL core profile extensions: OpenGL version string: 3.1 Mesa 18.3.6 OpenGL shading language version string: 1.40 OpenGL context flags: (none) Why are two versions, 3.3 (core) and 3.1, reported? Is it because for 3.3 I can only get core compatibility and for 3.1 it can be either core or compatibility profile? But when I tested it with code (using freeglut) requesting for 3.3 (core or compatibility profile), I can only get 3.1. I've tested the code with softpipe and llvmpipe. Furthermore the profile returned in the code below is always 0.
glutInitContextVersion(3, 3); glutInitContextProfile(GLUT_CORE_PROFILE); std::cout << "OpenGL version: " << glGetString(GL_VERSION) << '\n'; std::cout << "GLSL version: " << glGetString(GL_SHADING_LANGUAGE_VERSION) << '\n'; int major = 0; int minor = 0; int profile = 0; glGetIntegerv(GL_MAJOR_VERSION, &major); glGetIntegerv(GL_MINOR_VERSION, &minor); glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &profile); std::cout << "major:" << major << '\n' << "minor:" << minor << '\n' << "profile:" << profile << '\n'; So why is glxinfo reporting 3.3 core (besides 3.1) when I cannot request for it? Or am I reading glxinfo wrongly?