What does a completely basic #openGL #cpp app structure look like on #archlinux, using #glad and #glfw3, assuming that I have installed glfw from the arch repos and downloaded glad from the website generator? What should I stick into the Makefile? What does the main.cpp look like? Most material I find is centered around VSCode, and everything else confuses the f*ck out of me. I would like to be able to follow along learnopengl.com from the comfort of #emacs... #askfedi
@kf The tutorials are good already. When you install glad via arch, only the shared library gets install (i.e. libglad.so) and not the headers. For the headers, you should generate them at https://glad.dav1d.de/ with 'local files' checked and copy glad.h, glad.c and khrplatform.h to your project. In your main.cpp, you will need to change the glad include to #include "glad.h" (note that this is a relative path).
The compile flags will then look like this: g++ main.cpp glad.c -I. -lglfw -lGL -o main. I don't know make so I can't help you there. If you have the chance, I recommend CMake :)