Configure OSMesa before OpenGL
The configuration for OpenGL can change depending on whether OSMesa is used, so make sure OSMesa is always configured first so that the "correct" OpenGL is used.
The configuration for OpenGL can change depending on whether OSMesa is used, so make sure OSMesa is always configured first so that the "correct" OpenGL is used.