Is openxr.h part of the specification?

Is there text in the OpenXR spec to define the relationship between the specification and the header file openxr.h?

I’m looking for some reassurance (or not) that openxr.h is part of the specification… e.g if the openxr.h defines XR_TRUE as 1, then XR_TRUE must be 1. How about XR_MAX_PATH_LENGTH, XR_MAX_ACTION_NAME_SIZE, etc…

Those are all generated from the xr.xml which is the normative definition of the API. (The only non-generated header in the openxr*.h set is openxr_platform_defines.h, and the contents of that are described in the spec pose.) The values you mention are defined here: OpenXR-Docs/xr.xml at master · KhronosGroup/OpenXR-Docs · GitHub The XML is less of a pure tree and is more of an annotated header in parts.

I don’t think the transformation of the XML into the header is explicitly described in the spec, but code similar to what generates the header also generates the code snippets included in the human-readable part of the spec. But hopefully the pointer to the normative XML answers your more general question. (Most of the non-reflection headers should be incorporated as snippets in the the html and pdf spec as well…)

Thanks Ryan!

Someone was asking me about the spec vs the header file and having some way (xr.xml) to connect the two helps.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.