According to what i read here: http://www.linuxquestions.org/questions/linux-software-2/opengl-vs-mesa-whats-the-diff-351037/
Mesa is software rendering, while driver OpenGL is hardware rendering.
Every tutorial i came accross only show how to install Mesa. How can i set up a true (hardware accelerated) openGL? Does installing driver install the header? If so, which header? If i have a program compilled with mesa, do i have to recompile it to take the advantage of hardware accelerated? If installing the driver install the required library and header, what happen to mesa?
From the last post on the pointed site: "Does that mean that I should remove mesa packages if I have NVidia drivers installed?"
Also, now openGL is now version 4 and 5, but i can't find any tutorial that show how to create a context for those version, only version 3 max...
Like you can see, im not very sure how this work.
One last thing, this book: http://glprogramming.com/red/ is for which version of openGL? The guide version is 1.1 but it don't say it was written for which version.
Mesa is software rendering, while driver OpenGL is hardware rendering.
No. Mesa is an open source implementation of the OpenGL API and also provides a software rasterizer fallback. But Mesa is also the foundation for the open source GPU drivers for intel, radeon, radeonhd and noveau.
Every tutorial i came accross only show how to install Mesa. How can i set up a true (hardware accelerated) openGL?
OpenGL is just an API. That means it doesn't matter which implementation of OpenGL you use for development. You can develop with Mesa, but your program will run fine with propriatary drivers as well.
Does installing driver install the header?
Sometimes. But most Linux distributions prevent this and assume the Mesa headers as the canonical development resource.
If i have a program compilled with mesa, do i have to recompile it to take the advantage of hardware accelerated?
No. If you did everything right, i.e. linked your executable dynamically against libGL.so your program will work with any OpenGL implementation.
If installing the driver install the required library and header, what happen to mesa?
Depends on the distribution. Some distributions have the vendor driver replace libGL.so, but not the Mesa development files. Some distributions replace libGL.so and the headers. And some distributions put OpenGL implementations in /usr/lib/opengl and provide a tool for setting up symlinks (Gentoo). In practice, it doesn't matter.
From the last post on the pointed site: "Does that mean that I should remove mesa packages if I have NVidia drivers installed?"
Your distributions package manager will emit a warning if that's required. But like I said: It should no bother you, except, that the Mesa implementation supports only OpenGL-2.1. But that doesn't mean you cannot compile OpenGL-3 and upwards programs with it. They will just be not able to create an OpenGL-3 context and abort with an error message or fall back to OpenGL-2
来源:https://stackoverflow.com/questions/9304929/how-to-setup-a-opengl-developement-environment-without-mesa