1. Jason McKesson
  2. GL XML Specs
  3. Issues
Issue #4 resolved

How to select this sub-set of gl funcs?

created an issue

I love the XML file for the spec! Mostly grokking it but slightly confused as to its semantics when wanting to select specifically:

all functions that aren't deprecated, removed or compatibility-profile (that part's easy) and are valid from 3.2 or higher (easy too), that may be either in the core profile of an arbitrary core profile version since 3.2, or part of a set of permissible extensions A, B, C etc.

I cannot figure out how to have for example GenVertexArrays/BindVertexArray etc. included in my func selection without also selecting "weird" / unwanted funcs such as "NormalP3ui" that are neither in the core profile nor in my custom list of acceptable extensions A, B, C etc.

I'm already ignoring funcs that end with EXT, or end with the prefix of their "category", because the vertex-array funcs are "categorized" not as VERSION_something but as ARB_some_extension...

Thanks in advance for mulling this over ;)

Comments (6)

  1. metaleap reporter

    Alternatively, where do I find out more about how to correctly interpret each of the XML (or spec files') attributes (stuff like, what is extension=soft, etc.) instead of relying on my semi-adequate guesswork?

    Great work and repo by the way, here's hoping you'll keep the downloadable xml version up to date with regards to the .spec files... ;)

  2. Jason McKesson repo owner

    Thank you for your interest, but this isn't a forum. It's a bug tracker. This isn't a bug (though it could be construed as a feature request for information about the format).

    That being said, there is glLoadGen, which can generate headers/source loaders for a specific version of OpenGL, with a specific set of extensions. It's extensible, to the point where you could do pretty much any kind of processing of the spec files you want.

  3. Jason McKesson repo owner

    However, if you want some advice:

    • Every function that is part of OpenGL's specification has a version attribute. Every function that is purely an extension function does not have this attribute.

    • Every function that was removed from OpenGL in the 3.1 removal has the profile attribute set to compatibility.

    • Therefore, every function which has a version attribute and does not have profile="compatibility" is part of OpenGL's core profile. Specifically for the version named under version and later.

    • There are a set of OpenGL extensions called "core extensions". These are ARB extensions which are part of some version of OpenGL, but they are also extensions. This means that the enumerators and functions do not have an ARB suffix on them.

      ARB_vertex_buffer_object is not a core extension; it's functions and enums all end in ARB. So when VBO was brought into core in GL 1.5, they had to repeat them. So there are glBindBufferARB and glBindBuffer. If you have the ARB_vertex_buffer_object extension, you get glBindBufferARB; if you have GL 1.5 or greater, you get glBindBuffer. If you have both, you get both.

      ARB_vertex_array_object is a core extension; there is only glBindVertexArray, which can be exposed either by OpenGL version 3.0 or by having the ARB_vertex_array_object. Therefore, you don't need to pick one function or the other based on a version or extension. In the spec file, BindVertexArray has both a version attribute and a category that isn't a VERSION category.

      There is no list of all core OpenGL extensions. Well, there is, but it's part of glLoadGen, and I have to manually update it when new extensions come out. It's not part of this distro, since this distro is just a transformation of the .spec file format. And that format doesn't tell you what the core extensions are.

  4. metaleap reporter

    Thanks for the in-depth answer and apologies for abusing your bug tracker -- the Wiki was empty and I didn't notice any forum/blog links or similar...

    "Therefore, every function which has a version attribute and does not have profile="compatibility" is part of OpenGL's core profile."

    This would include for example IsImageHandleResidentNV() or TextureStorageSparseAMD() then -- not what I would have expected, but OK ;)

  5. Jason McKesson repo owner

    I can't be responsible for spec bugs; that's what the .spec files say, so that's how it works. The version field should only be used for functions from that GL version.

  6. Log in to comment