[go: nahoru, domu]

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

Handle GLbitmask/GLbitfield correctly #7

Open
httpdigest opened this issue Aug 13, 2017 · 0 comments
Open

Handle GLbitmask/GLbitfield correctly #7

httpdigest opened this issue Aug 13, 2017 · 0 comments

Comments

@httpdigest
Copy link
Member

Here is what I think should be the correct way of handling those. The steps are being excercised for the example of "glBufferStorage" and its flags GLbitfield parameter:

  1. for all /registry/enums elements that have a type="bitmask" attribute, the generator has to build a separate group with the enum values defined in that element (hint: the "group" attribute cannot be used for anything since it is hardly ever referenced anywhere)
  2. for each /registry/feature/require (example GL_VERSION_4_4) and /registry/extensions/extension/require (example GL_ARB_buffer_storage) elements, we first have to search whether there is a <command> defined in it (example glBufferStorage) that takes at least one GLbitfield parameter. This information is found in the corresponding /registry/commands/command element.
  3. If we found at least one such command, we have to match all enum elements in /registry/feature/require (example GL_VERSION_4_4) and /registry/extensions/extension/require (example GL_ARB_buffer_storage) with all previously created bitmask groups to see which of the enums are bitfield enums. For each enum found in a group A that group A is then considered a candidate group when looking up the name(s) of a GLbitfield argument by its value for a called command defined by this extension or core GL version.
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

1 participant