Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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 ?

share|improve this question

1 Answer 1

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.

share|improve this answer
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. –  Sean Middleditch Nov 21 '12 at 6:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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