Running the command glxinfo | grep OpenGL shows
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on SVGA3D; build: RELEASE;
OpenGL version string: 2.1 Mesa 10.7.0-devel
OpenGL shading language version string: 1.20
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 2.0 Mesa 10.7.0-devel
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
I have the Intel HD 4000 graphic card which can support OpenGL 3.3 according to the sources on internet.
Simply, what should I do so that glxinfo shows version 3.3 so that I may proceed to learn modern graphics programming?
You're running in a VM. GPUs usually are not passed through to the VM and all you get is a shim-driver supporting only a lower OpenGL version, which commands are passed through the VM to the host.
Solution: Run Linux natively on your box.