0
$\begingroup$

I have a modern OpenGL project hosted publicly. I want to create the easiest experience so someone can just clone the repo and have it just work.

So far, I have included (as git submodules) the window creation library GLFW and the image loading library which is header only.

The only other part I have to handle is the OpenGL function loading part. During development I have been using the webservice offered by glad

The two files I need from GLAD are roughly ~10k lines each.

Other than asking a user to downloading these files and place them in the correct folder themselves, is there any way to get around including these files directly in my project?

Are there any other drawbacks to included the function loading code directly in my project?

$\endgroup$

1 Answer 1

1
$\begingroup$

GLAD is designed around you simply including it directly in your project. That's the point of it; it is easy to use because you don't have to deal with any external dependencies. No messy libraries or DLLs to generate. It's just another source/header file in your build process.

Furthermore, your code will (presumably) be written to expect GLAD generation with a specific OpenGL version and set of extensions. If you require the user to use GLAD to generate the file, you also have to tell them what version+extensions to use, or else your code won't compile. If you just ship the GLAD-generated files with your program, there's no chance of breakage (or at least, you could detect the breakage because your own build doesn't work anymore).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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