Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
godotengine
GitHub Repository: godotengine/godot
Path: blob/master/modules/openxr/doc_classes/OpenXRExtensionWrapper.xml
10278 views
1
<?xml version="1.0" encoding="UTF-8" ?>
2
<class name="OpenXRExtensionWrapper" inherits="Object" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
3
<brief_description>
4
Allows implementing OpenXR extensions with GDExtension.
5
</brief_description>
6
<description>
7
[OpenXRExtensionWrapper] allows implementing OpenXR extensions with GDExtension. The extension should be registered with [method register_extension_wrapper].
8
</description>
9
<tutorials>
10
</tutorials>
11
<methods>
12
<method name="_get_composition_layer" qualifiers="virtual">
13
<return type="int" />
14
<param index="0" name="index" type="int" />
15
<description>
16
Returns a pointer to an [code]XrCompositionLayerBaseHeader[/code] struct to provide the given composition layer.
17
This will only be called if the extension previously registered itself with [method OpenXRAPIExtension.register_composition_layer_provider].
18
</description>
19
</method>
20
<method name="_get_composition_layer_count" qualifiers="virtual">
21
<return type="int" />
22
<description>
23
Returns the number of composition layers this extension wrapper provides via [method _get_composition_layer].
24
This will only be called if the extension previously registered itself with [method OpenXRAPIExtension.register_composition_layer_provider].
25
</description>
26
</method>
27
<method name="_get_composition_layer_order" qualifiers="virtual">
28
<return type="int" />
29
<param index="0" name="index" type="int" />
30
<description>
31
Returns an integer that will be used to sort the given composition layer provided via [method _get_composition_layer]. Lower numbers will move the layer to the front of the list, and higher numbers to the end. The default projection layer has an order of [code]0[/code], so layers provided by this method should probably be above or below (but not exactly) [code]0[/code].
32
This will only be called if the extension previously registered itself with [method OpenXRAPIExtension.register_composition_layer_provider].
33
</description>
34
</method>
35
<method name="_get_requested_extensions" qualifiers="virtual">
36
<return type="Dictionary" />
37
<description>
38
Returns a [Dictionary] of OpenXR extensions related to this extension. The [Dictionary] should contain the name of the extension, mapped to a [code]bool *[/code] cast to an integer:
39
- If the [code]bool *[/code] is a [code]nullptr[/code] this extension is mandatory.
40
- If the [code]bool *[/code] points to a boolean, the boolean will be updated to [code]true[/code] if the extension is enabled.
41
</description>
42
</method>
43
<method name="_get_suggested_tracker_names" qualifiers="virtual">
44
<return type="PackedStringArray" />
45
<description>
46
Returns a [PackedStringArray] of positional tracker names that are used within the extension wrapper.
47
</description>
48
</method>
49
<method name="_get_viewport_composition_layer_extension_properties" qualifiers="virtual">
50
<return type="Dictionary[]" />
51
<description>
52
Gets an array of [Dictionary]s that represent properties, just like [method Object._get_property_list], that will be added to [OpenXRCompositionLayer] nodes.
53
</description>
54
</method>
55
<method name="_get_viewport_composition_layer_extension_property_defaults" qualifiers="virtual">
56
<return type="Dictionary" />
57
<description>
58
Gets a [Dictionary] containing the default values for the properties returned by [method _get_viewport_composition_layer_extension_properties].
59
</description>
60
</method>
61
<method name="_on_before_instance_created" qualifiers="virtual">
62
<return type="void" />
63
<description>
64
Called before the OpenXR instance is created.
65
</description>
66
</method>
67
<method name="_on_event_polled" qualifiers="virtual">
68
<return type="bool" />
69
<param index="0" name="event" type="const void*" />
70
<description>
71
Called when there is an OpenXR event to process. When implementing, return [code]true[/code] if the event was handled, return [code]false[/code] otherwise.
72
</description>
73
</method>
74
<method name="_on_instance_created" qualifiers="virtual">
75
<return type="void" />
76
<param index="0" name="instance" type="int" />
77
<description>
78
Called right after the OpenXR instance is created.
79
</description>
80
</method>
81
<method name="_on_instance_destroyed" qualifiers="virtual">
82
<return type="void" />
83
<description>
84
Called right before the OpenXR instance is destroyed.
85
</description>
86
</method>
87
<method name="_on_main_swapchains_created" qualifiers="virtual">
88
<return type="void" />
89
<description>
90
Called right after the main swapchains are (re)created.
91
</description>
92
</method>
93
<method name="_on_post_draw_viewport" qualifiers="virtual">
94
<return type="void" />
95
<param index="0" name="viewport" type="RID" />
96
<description>
97
Called right after the given viewport is rendered.
98
[b]Note:[/b] The draw commands might only be queued at this point, not executed.
99
</description>
100
</method>
101
<method name="_on_pre_draw_viewport" qualifiers="virtual">
102
<return type="void" />
103
<param index="0" name="viewport" type="RID" />
104
<description>
105
Called right before the given viewport is rendered.
106
</description>
107
</method>
108
<method name="_on_pre_render" qualifiers="virtual">
109
<return type="void" />
110
<description>
111
Called right before the XR viewports begin their rendering step.
112
</description>
113
</method>
114
<method name="_on_process" qualifiers="virtual">
115
<return type="void" />
116
<description>
117
Called as part of the OpenXR process handling. This happens right before general and physics processing steps of the main loop. During this step controller data is queried and made available to game logic.
118
</description>
119
</method>
120
<method name="_on_register_metadata" qualifiers="virtual">
121
<return type="void" />
122
<description>
123
Allows extensions to register additional controller metadata. This function is called even when the OpenXR API is not constructed as the metadata needs to be available to the editor.
124
Extensions should also provide metadata regardless of whether they are supported on the host system. The controller data is used to setup action maps for users who may have access to the relevant hardware.
125
</description>
126
</method>
127
<method name="_on_session_created" qualifiers="virtual">
128
<return type="void" />
129
<param index="0" name="session" type="int" />
130
<description>
131
Called right after the OpenXR session is created.
132
</description>
133
</method>
134
<method name="_on_session_destroyed" qualifiers="virtual">
135
<return type="void" />
136
<description>
137
Called right before the OpenXR session is destroyed.
138
</description>
139
</method>
140
<method name="_on_state_exiting" qualifiers="virtual">
141
<return type="void" />
142
<description>
143
Called when the OpenXR session state is changed to exiting.
144
</description>
145
</method>
146
<method name="_on_state_focused" qualifiers="virtual">
147
<return type="void" />
148
<description>
149
Called when the OpenXR session state is changed to focused. This state is the active state when the game runs.
150
</description>
151
</method>
152
<method name="_on_state_idle" qualifiers="virtual">
153
<return type="void" />
154
<description>
155
Called when the OpenXR session state is changed to idle.
156
</description>
157
</method>
158
<method name="_on_state_loss_pending" qualifiers="virtual">
159
<return type="void" />
160
<description>
161
Called when the OpenXR session state is changed to loss pending.
162
</description>
163
</method>
164
<method name="_on_state_ready" qualifiers="virtual">
165
<return type="void" />
166
<description>
167
Called when the OpenXR session state is changed to ready. This means OpenXR is ready to set up the session.
168
</description>
169
</method>
170
<method name="_on_state_stopping" qualifiers="virtual">
171
<return type="void" />
172
<description>
173
Called when the OpenXR session state is changed to stopping.
174
</description>
175
</method>
176
<method name="_on_state_synchronized" qualifiers="virtual">
177
<return type="void" />
178
<description>
179
Called when the OpenXR session state is changed to synchronized. OpenXR also returns to this state when the application loses focus.
180
</description>
181
</method>
182
<method name="_on_state_visible" qualifiers="virtual">
183
<return type="void" />
184
<description>
185
Called when the OpenXR session state is changed to visible. This means OpenXR is now ready to receive frames.
186
</description>
187
</method>
188
<method name="_on_sync_actions" qualifiers="virtual">
189
<return type="void" />
190
<description>
191
Called when OpenXR has performed its action sync.
192
</description>
193
</method>
194
<method name="_on_viewport_composition_layer_destroyed" qualifiers="virtual">
195
<return type="void" />
196
<param index="0" name="layer" type="const void*" />
197
<description>
198
Called when a composition layer created via [OpenXRCompositionLayer] is destroyed.
199
[param layer] is a pointer to an [code]XrCompositionLayerBaseHeader[/code] struct.
200
</description>
201
</method>
202
<method name="_set_android_surface_swapchain_create_info_and_get_next_pointer" qualifiers="virtual">
203
<return type="int" />
204
<param index="0" name="property_values" type="Dictionary" />
205
<param index="1" name="next_pointer" type="void*" />
206
<description>
207
Adds additional data structures to Android surface swapchains created by [OpenXRCompositionLayer].
208
[param property_values] contains the values of the properties returned by [method _get_viewport_composition_layer_extension_properties].
209
</description>
210
</method>
211
<method name="_set_frame_end_info_and_get_next_pointer" qualifiers="virtual">
212
<return type="int" />
213
<param index="0" name="next_pointer" type="void*" />
214
<description>
215
Adds additional data structures to [code]XrFrameEndInfo[/code].
216
This will only be called if the extension previously registered itself with [method OpenXRAPIExtension.register_frame_info_extension].
217
</description>
218
</method>
219
<method name="_set_frame_wait_info_and_get_next_pointer" qualifiers="virtual">
220
<return type="int" />
221
<param index="0" name="next_pointer" type="void*" />
222
<description>
223
Adds additional data structures to [code]XrFrameWaitInfo[/code].
224
This will only be called if the extension previously registered itself with [method OpenXRAPIExtension.register_frame_info_extension].
225
</description>
226
</method>
227
<method name="_set_hand_joint_locations_and_get_next_pointer" qualifiers="virtual">
228
<return type="int" />
229
<param index="0" name="hand_index" type="int" />
230
<param index="1" name="next_pointer" type="void*" />
231
<description>
232
Adds additional data structures when each hand tracker is created.
233
</description>
234
</method>
235
<method name="_set_instance_create_info_and_get_next_pointer" qualifiers="virtual">
236
<return type="int" />
237
<param index="0" name="next_pointer" type="void*" />
238
<description>
239
Adds additional data structures when the OpenXR instance is created.
240
</description>
241
</method>
242
<method name="_set_projection_views_and_get_next_pointer" qualifiers="virtual">
243
<return type="int" />
244
<param index="0" name="view_index" type="int" />
245
<param index="1" name="next_pointer" type="void*" />
246
<description>
247
Adds additional data structures to the projection view of the given [param view_index].
248
</description>
249
</method>
250
<method name="_set_reference_space_create_info_and_get_next_pointer" qualifiers="virtual">
251
<return type="int" />
252
<param index="0" name="reference_space_type" type="int" />
253
<param index="1" name="next_pointer" type="void*" />
254
<description>
255
Adds additional data structures to [code]XrReferenceSpaceCreateInfo[/code].
256
</description>
257
</method>
258
<method name="_set_session_create_and_get_next_pointer" qualifiers="virtual">
259
<return type="int" />
260
<param index="0" name="next_pointer" type="void*" />
261
<description>
262
Adds additional data structures when the OpenXR session is created.
263
</description>
264
</method>
265
<method name="_set_swapchain_create_info_and_get_next_pointer" qualifiers="virtual">
266
<return type="int" />
267
<param index="0" name="next_pointer" type="void*" />
268
<description>
269
Adds additional data structures when creating OpenXR swapchains.
270
</description>
271
</method>
272
<method name="_set_system_properties_and_get_next_pointer" qualifiers="virtual">
273
<return type="int" />
274
<param index="0" name="next_pointer" type="void*" />
275
<description>
276
Adds additional data structures when querying OpenXR system abilities.
277
</description>
278
</method>
279
<method name="_set_view_locate_info_and_get_next_pointer" qualifiers="virtual">
280
<return type="int" />
281
<param index="0" name="next_pointer" type="void*" />
282
<description>
283
Adds additional data structures to [code]XrViewLocateInfo[/code].
284
This will only be called if the extension previously registered itself with [method OpenXRAPIExtension.register_frame_info_extension].
285
</description>
286
</method>
287
<method name="_set_viewport_composition_layer_and_get_next_pointer" qualifiers="virtual">
288
<return type="int" />
289
<param index="0" name="layer" type="const void*" />
290
<param index="1" name="property_values" type="Dictionary" />
291
<param index="2" name="next_pointer" type="void*" />
292
<description>
293
Adds additional data structures to composition layers created by [OpenXRCompositionLayer].
294
[param property_values] contains the values of the properties returned by [method _get_viewport_composition_layer_extension_properties].
295
[param layer] is a pointer to an [code]XrCompositionLayerBaseHeader[/code] struct.
296
</description>
297
</method>
298
<method name="get_openxr_api">
299
<return type="OpenXRAPIExtension" />
300
<description>
301
Returns the created [OpenXRAPIExtension], which can be used to access the OpenXR API.
302
</description>
303
</method>
304
<method name="register_extension_wrapper">
305
<return type="void" />
306
<description>
307
Registers the extension. This should happen at core module initialization level.
308
</description>
309
</method>
310
</methods>
311
</class>
312
313