Hello!
This is not purely a feature request, but more like a suggestion. I have no idea if it has been suggested before or not as the search function still doesn't work for me.
Anyhow, I stumbled upon this project called glLoadGen which can be used as a replacement for GLEW and similar libraries. It is not a library in itself, but merely a lua script which accepts parameters telling it which gl version is desired, and which extensions are to be used. Then it spits out a header/source pair which contains the desired functions/enums and they can directly be used in your project. No external linking nor runtime library loading required!
I thought this sounded pretty awesome so I tried it out in my own project and it was super easy to switch. It took me about 15 minutes. I just ran this:
lua LoadGen.lua -style=pointer_c -spec=gl -version=3.2 -profile=core core_3_2
Then I included those, and replaced the glewInit call with ogl_LoadFunctions and then included the generated header instead of glew. No sweat, blood nor tears.
The licensing of the script is MIT licence and I don't think there is any particular licence on the generated files. At least I couldn't find any info on it.
I thought this would fit SFML well since it aims to be simple for newbies, and we all know that newbies
hate to deal with external libraries, linking errors and stuff like that, and glew can be pretty nasty on that front. SFML even had special hacky solutions to make this easy in the past, but with this, the dependency could perhaps be dropped entirely.
So is there anything that I have missed in my excitement about this approach? Has this been discussed before? Or is it indeed a good idea?
Let me know.
EDIT: here is a link
The licensing of the script is MIT licence and I don't think