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

Per-feature headers and gl namespace #325

Open
bekorn opened this issue Dec 5, 2021 · 1 comment
Open

Per-feature headers and gl namespace #325

bekorn opened this issue Dec 5, 2021 · 1 comment

Comments

@bekorn
Copy link

bekorn commented Dec 5, 2021

I liked the idea of per-feature headers very much. However I was hoping for a stricter implementation. Even though I include only the gl45core, deprecated functions are accessible through the gl namespace. Below is a test project

image

Currently line 6 gives an error but line 5 does not. Is there a way to use glbinding where both lines give an error, i.e. defined gl functions are the only ones from the included feature header?

@scheibel
Copy link
Member

Nice catch, although this is actually a design principle of glbinding.

Can you elaborate a little bit more on the intended use? Do you plan to detect all non-conforming uses against an OpenGL 4.5 Core context?

As of now, I can imagine two different solutions we could pursue:

  1. Finally work on Add flags for feature and profile generation khrbinding-generator#1 to allow for a glbinding build that only supports a subset of features (e.g., only 45core)
  2. Provide a compile-time definition that renames the general gl namespace to indicate an internal-only use, such that accidental use is more difficult.

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

No branches or pull requests

2 participants