Supposing that i have my program that is targeting a specific OpenGL version, let's say the 3.0, now i want to produce an executable that will support the software rendering with Mesa and another executable that will support the Hardware accelerated context, i can use the same source code for both without expecting any issues ?

In another words, the instrunctions in this libraries are the same for my linking purpose ?


closed as too broad by Josh Nov 11 '14 at 17:18

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


Mesa and other libraries that implement the opengl API are dynamically linked, so yes, your application doesn't need to know what the actual library is.

  • 1
    \$\begingroup\$ Dynamic linking isn't relevant to source compatibility, nor is this statement correct. There's no guarantee that the linkage of any two OpenGL libraries are the same. Linux proprietary OpenGL libraries make an effort to be compatible with Mesa for practical reasons on that platform (there's no cross-vendor ICD yet for Linux, though one is apparently in the works thanks to NVIDIA). On Windows, all OpenGL drivers go through the OpenGL32.DLL ICD, but Mesa does not. Other platforms may or may not have some degree of compatibility between different vendors' GL implementations. \$\endgroup\$ – Sean Middleditch Nov 21 '12 at 6:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.