Open rpavlik opened 1 year ago
Might be necro, but I actually like this idea. However, is a default value specified for the prefix
parameter? If not, I think it should have a default glad
value.
Sorry I should have at least put a comment here, this is still on my "to consider" list, it is very simple so I might still end up doing it, but my stance was always it's easier/better to just ran sed
on the generated files, this will catch all occurences.
Making the prefix configurable within the code generation just makes everything a lot more ugly, if it is done for all symbols (including API, defines etc.), but maybe just the exported symbols is enough.
Hi @Dav1dde,
I think a lot of people that use glad2 write on Windows. I think this feature would be very helpful to people using systems without Unix commands.
I'd also like to re-emphasize that I think the prefix
parameter should be optional, such that not specifying it at all defaults to glad
anyway. I think this would be really convenient to have in the build system especially when using CMake.
Thank you for reading
I think this would be really convenient to have in the build system especially when using CMake.
CMake is one of my main painpoints and if there wasnt so many people using it, I would have already deleted it. You're better off including the generated files in your repo.
Which also means as a Windows user you can use search and replace of your IDE, although this is more a change that is useful for library authors not application/game developers.
Hi @Dav1dde,
I understand what you're getting at. Also, I sympathize with your dislike of CMake. I personally include GLAD headeronly anyway, because I don't like using it through CMake. I try to use CMake as little as possible, though I was trying to consider alternative use cases.
Thank you for responding
To avoid symbol conflicts.
I don't super love my implementation here because it encodes the whole "prefix + _ + name" thing in more than one place, but it doesn't make it less DRY than it was before.