I have been using OpenGL 4.X already for a while to write Windows applications.I am using GLEW to access OpenGL API and GLFW for context ,window and input.Now I am planning to move to Linux for some specific project.Having never written OpenGL on that platform before I would like to know what are the common industry standards today for developing OpenGL 4.x software on Linux platform?I have read about Mesa3D and noticed it support GL 3.1 only.GLEW and GLFW are cross-platform so I believe I can use those on Linux with no issues?Would like to get further tips.
I know I can use Qt OpenGL API but I am currently interested in “pure” C++ solution.
Mesa is a open source implementation of the OpenGL API and has several backends, including interfaces to the open source GPU driver architecture DRI2. So contrary to popular belief Mesa is not just some software rasterizer (it used to be, a long time ago).
But
This does not matter in any way to you! OpenGL is a API and any implementation that adheres to it can be used. Also the binary interface of the libraries (the ABI) is well defined. Which means that all you need to do, to start OpenGL-4 development is finding some implementation that supports it so that you can test your programs.
Right now there are two, unfortunately neither is open source:
The libGL.so shipped by either of these do adhere to the GLX OpenGL ABI rules so you can safely just dynamically link your program against libGL.so and it will work with whatevery implementation is installed on the target system.
Now for just compiling your program you don’t need a full blown OpenGL implementation. All you need is some libGL.so that to the outside looks like an OpenGL implementation that follows the ABI specification. And the ABI specification goes only up to good old OpenGL-1.2 and everything above is loaded through the extension mechanism. Also OpenGL-4. And a implementation which libGL.so does conform to this is… Mesa. And for getting those extension loaded some extension loader like GLEW.
To make a long story short. You can develop, by which I mean build, OpenGL-4 applications with GLEW and Mesa just fine. Only for actually executing it you need a OpenGL-4 supporting implementation.