I program C++ applications on (Ubuntu) Linux and compile them to 2 operating systems: natively to Linux by using \"g++\" (GNU C++ compiler) and cross-compile them to
There is no need to compile Mesa3D for MinGW. MinGW includes the GL library; it's just not called libGL.a
nor libGLU.a
; the libraries are instead called libopengl32.a
and libglu32.a
. Sadly, this is what Microsoft decided to call them under Windows on Visual Studio, so both Windows and GNU/Linux release of MinGW decided to include the libraries named as above.
So, when cross compiling for Windows, just change:
-lGL -lGLU
into
-lopengl32 -lglu32
Mesa3D on GNU/Linux is actually a name for a libre implementation of OpenGL. This is because OpenGL is a trademark, and SGI's policy did not allow for anyone to use the name without paying a hefty sum of money. Despite this, SGI provided the author, Brian Paul, a copy of the testing suite.
Mesa3D is on most platforms with native OpenGL implementation known as a software "sanity check" library with emulation of numerous high-end-hardware-only features. But on GNU/Linux, much more important is something called DRI or direct rendering interface. This is the real deal, the hardware acceleration and all. This library is also called Mesa3D; in fact, provisioning for DRI is a part of Mesa3D as well as of X11 and the kernel.
Mesa3D provides libre OpenGL-compatible headers on GNU/Linux and other free platforms.
Summary: Mesa3D is the name for the GNU/Linux implementation of OpenGL since that name is trademarked. This library includes an excellent, featureful, correct and relatively fast software implementation. It also includes direct rendering interface for hardware acceleration.