I have developed a scientific code package (for collisional/gravitational N-body simulations). It does not require any libraries to run. People can download it and simply type make to compile it. I want to keep it that simple.
I added OpenGL as an option to visualize the simulation in real time. It looks really great. However, some people don't have an OpenGL/GLUT library installed on their machine.
What is the easiest way to allow those users to use my code without having to install external libraries manually. I have the feeling that if I write a sentence like "Please install OpenGL/GLUT." in the manual, it will put off many people. Can I just add freeglut to my source package? Is that a good idea, or do you have any other suggestions?
OpenGL is not really a library, despite the name. I suggest reading the L of OpenGL as "Layer". OpenGL comes as part of the GPUs drivers. In that case the dynamic library installed on the system provides an API to the drivers, but next to no internal functionality. So there it makes no sense shipping an OpenGL "library" with your program.
You just make it dependent on opengl32.dll/libGL.so/OpenGLFramework. If use of OpenGL is optional, there is the possibility to load the API access library dynamically, but this is quite a mess.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With