KhronosGroup / OpenXR-Docs

OpenXR Specification sources and related material
Other
143 stars 62 forks source link

OpenXR API Reference Pages and Function Classification #141

Closed mshoaib6 closed 1 year ago

mshoaib6 commented 1 year ago

I am working on a security-related project involving OpenXR. I would like to know if there is a classification of API functions provided by OpenXR. The OpenXR API Reference Pages show a list of functions but do not classify them into categories (i.e. functions relevant to rendering, user input, network, files). Is there any kind of classification of these functions provided somewhere? Thanks!

rpavlik commented 1 year ago

The XML registry of the API has some categorization: functions are included in the specification by "require" tags, which are split into some basic groups. The relevant parts start here: https://github.com/KhronosGroup/OpenXR-Docs/blob/main/specification/registry/xr.xml#L4594

(Note there is nothing about files or network, the API is intended to be fairly high level and leave a lot of freedom to the implementer)

Otherwise, your best bet is to look at which chapter they're documented in: https://github.com/KhronosGroup/OpenXR-Docs/tree/main/specification/sources/chapters

There are lots of lines in the asciidoctor source that should be pretty easy to extract to come up with this kind of categorization: could do the ref page extraction tags:

[open,refpage='xrCreateActionSet',desc='Creates an XrActionSet',type='protos',xrefs='XrActionSet XrActionSetCreateInfo xrDestroyActionSet']`

or the includes of generated data

include::{generated}/api/protos/xrCreateActionSet.txt[]

(In both of those examples, "protos" means function prototypes)

Does this help?

I'm not sure how hard it would be to mention the chapter a ref page is extracted from. We have the data, we'd just have to adjust the scripts.