Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use namespaces for more modern code #219

Closed
holybubbles opened this issue Jul 1, 2019 · 3 comments
Closed

Use namespaces for more modern code #219

holybubbles opened this issue Jul 1, 2019 · 3 comments

Comments

@holybubbles
Copy link

The entire codebase using the "glad" prefix on all its functions. I was thinking that maybe it should switch to using namespaces but I realize that would be a breaking change so maybe it could be set with a compile definition like #define GLAD_USE_NAMESPACES or something like that so that it's an optional feature?

@ghost
Copy link

ghost commented Jul 1, 2019 via email

@holybubbles
Copy link
Author

The files are generated rather than statically typed it seems, since I couldn't find the source files in the repo, but how about having 2 includes? Set the flag and it includes the namespace version rather than the prefix version? That wouldn't break anything as the default would be prefix but those who want to use namespace could set the flag and get them

@Dav1dde
Copy link
Owner

Dav1dde commented Jul 1, 2019

You can for now easily do this using sed or any search-replace tool, just use it on the generated code.

This is also discussed in: #198 - I plan to add this to glad2 as an option at one point (PR welcome), but this isnt exactly high priority for me (since it is pretty easy to do with sed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants