You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The initialization process stores the function pointer for the next layer (or the instance we actually can't know and should act transparently).
70
+
The initialization process stores the function pointer for either the next layer, or the instance. (We actually cannot really know if we are the last layer in the chain, and we should act transparently regardless).
71
+
71
72
The `GetNextLayerFunction(xrFunctionName)` macro is a helper to allow you to retrive it from the `OpenXRLayer` instance.
72
73
73
74
To avoid clashing with the function declared in `openxr.h`, we prefix these functions with `thisLayer_`.
If the layer do not implement any extension, you must comment this example value.
98
+
96
99
Uncomment the `list(APPEND ...)` calls, and replace them with the name and version of the extension.
97
100
98
101
This will do three things:
@@ -101,7 +104,7 @@ This will do three things:
101
104
2. It will add the list of extensions supported by the layer in `layer_config.hpp`.
102
105
3. It will activate code in the layer initialization function to create an instance that adds listed extensions in their `enabledExtensionNames` array.
103
106
104
-
If the extension in question requires adding new OpenXR functions, they need to be added to the shim dispatch table. However, since these functions presumably don't exist in the runtime/next layer (as you are the implementation point), you don't need to find a function pointer to call back to.
107
+
If the extension in question requires adding new OpenXR functions, they need to be added to the shim dispatch table. However, since these functions presumably don't exist in the runtime/next layer (as you are the implementation point), you don't need to find a function pointer to wrap around.
105
108
106
109
For example, this template implements a bogus extension called `XR_TEST_test_me`; this function's only purpose is to add the function `xrTestMeTEST`. This function only prints a message to the standard output.
You can also specify `XR_LOADER_DEBUG=all` to cause the loader to output all debug messages it can to standard output. This is useful for debugging layer loading issues.
204
207
208
+
For more installation about OpenXR API Layer intallation and usage, please reffer to the OpenXR Loader specification chapters about API Layers. The [discovery](https://github.com/KhronosGroup/OpenXR-SDK-Source/blob/main/specification/loader/api_layer.adoc#api-layer-discovery) section might be of particular interest to layer developers.
209
+
205
210
## Legal
206
211
207
-
Copyright (C) 2021 Artur Brainville, distributed under the MIT license agreement. (REUSE 3.0 compliant.)
212
+
Copyright (C) 2021-2022 Artur Brainville, distributed under the MIT license agreement. (REUSE 3.0 compliant.)
208
213
209
214
This is built on top of the OpenXR SDK. The OpenXR SDK is distributed by the Khronos group under the terms of the Apache 2.0 License.
210
215
This template project does not link against any binaries from the OpenXR SDK but includes header files generated from the OpenXR registry and the standard OpenXR loader project.
0 commit comments