The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

doc: Add documentation for implementing extensions

authored by

Christoph Haag and committed by
Jakob Bornecrantz
02e6b789 ee429ac2

+32
+31
doc/implementing-extensions.md
··· 1 + # Implementing OpenXR extensions {#implementing-extension} 2 + 3 + <!-- 4 + Copyright 2021, Collabora, Ltd. and the Monado contributors 5 + SPDX-License-Identifier: BSL-1.0 6 + --> 7 + 8 + Khronos often adds new functionality to the OpenXR specification as extensions. 9 + 10 + The general steps to implement an OpenXR extension in Monado are as follows. 11 + 12 + * Edit scripts/generate_oxr_ext_support.py. Usually you only need to add an 13 + entry to the `EXTENSIONS` list at the top. 14 + * Run the script `python scripts/generate_oxr_ext_support.py`. 15 + * Format the regenerated file with 16 + `clang-format -i src/xrt/state_trackers/oxr/oxr_extension_support.h`. 17 + * Add entry points for each new function in 18 + `src/xrt/state_trackers/oxr/oxr_api_negotiate.c`. 19 + * Monado internal implementations of "objects" (think XrSession or 20 + XrHandTracker) go into `src/xrt/state_trackers/oxr/oxr_objects.h`. 21 + * Enums, defines and types go into `src/xrt/include/xrt/xrt_defines.h`. OpenXR 22 + types are not used outside of the `oxr_api_*` files, instead equivalents with 23 + the prefix `XRT_` are defined here. 24 + * Add Monado specific prototypes for the new functions in 25 + `src/xrt/state_trackers/oxr/oxr_objects.h`. The Monado implementations of 26 + OpenXR functions are prefixed with `oxr_`. 27 + * Implement the Monado specific functions in an appropriate source file 28 + `src/state_trackers/oxr/oxr_api_*.c`. Trivial functions can be implemented 29 + right there along with the usual parameter checks. More complex functions that 30 + access more internal monado state should call functions implemented in the 31 + relevant `oxr_*.c` file (without `_api_`).
+1
doc/mainpage.md
··· 21 21 * @ref ipc-design 22 22 * @ref frame-timing 23 23 * @ref tracing 24 + * @ref implementing-extension 24 25 25 26 ## Source layout 26 27