My system reports that im using OpenGL 4.2: https://pastebin.com/uXu3BLxX But when i try to use that OpenGL vesion to write a program with it, it fails, the maximum version i can use for that is OpenGL 2.1, why does that happen?
It’s more than likely that your hardware doesn’t support OpenGL 4.2. While your system may be reporting that it’s using version 4.2, llvmpipe is a software implementation of OpenGL rather than a hardware implementation.
Looking at your paste bin you can see it’s using Core Profile & Compatibility Profile which means that it only supports the core features of OpenGL 4.2 and provides backward compatibility with older versions of OpenGL. If you want to use the compatibility profile, the highest version you can request is 3.0, however your hardware/driver probably only supports 3.0 as Core Profiles and to why you’re stuck with OpenGL 2.1.