Debian Codegraph @

servers/register_server_types.cpp

raw symbols SCIP
1 /**************************************************************************/
2 /* register_server_types.cpp */
3 /**************************************************************************/
4 /* This file is part of: */
5 /* GODOT ENGINE */
6 /* https://godotengine.org */
7 /**************************************************************************/
8 /* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
9 /* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
10 /* */
11 /* Permission is hereby granted, free of charge, to any person obtaining */
12 /* a copy of this software and associated documentation files (the */
13 /* "Software"), to deal in the Software without restriction, including */
14 /* without limitation the rights to use, copy, modify, merge, publish, */
15 /* distribute, sublicense, and/or sell copies of the Software, and to */
16 /* permit persons to whom the Software is furnished to do so, subject to */
17 /* the following conditions: */
18 /* */
19 /* The above copyright notice and this permission notice shall be */
20 /* included in all copies or substantial portions of the Software. */
21 /* */
22 /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
23 /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
24 /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
25 /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
26 /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
27 /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
28 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
29 /**************************************************************************/
30
31 #include "register_server_types.h"
32
33 #include "core/config/engine.h"
34 #include "core/config/project_settings.h"
35
36 #include "audio/audio_effect.h"
37 #include "audio/audio_server.h"
38 #include "audio/audio_stream.h"
39 #include "audio/effects/audio_effect_amplify.h"
40 #include "audio/effects/audio_effect_capture.h"
41 #include "audio/effects/audio_effect_chorus.h"
42 #include "audio/effects/audio_effect_compressor.h"
43 #include "audio/effects/audio_effect_delay.h"
44 #include "audio/effects/audio_effect_distortion.h"
45 #include "audio/effects/audio_effect_eq.h"
46 #include "audio/effects/audio_effect_filter.h"
47 #include "audio/effects/audio_effect_hard_limiter.h"
48 #include "audio/effects/audio_effect_panner.h"
49 #include "audio/effects/audio_effect_phaser.h"
50 #include "audio/effects/audio_effect_pitch_shift.h"
51 #include "audio/effects/audio_effect_record.h"
52 #include "audio/effects/audio_effect_reverb.h"
53 #include "audio/effects/audio_effect_spectrum_analyzer.h"
54 #include "audio/effects/audio_effect_stereo_enhance.h"
55 #include "audio/effects/audio_stream_generator.h"
56 #include "camera/camera_feed.h"
57 #include "camera/camera_server.h"
58 #include "debugger/servers_debugger.h"
59 #include "display/display_server.h"
60 #include "display/native_menu.h"
61 #include "movie_writer/movie_writer.h"
62 #include "movie_writer/movie_writer_pngwav.h"
63 #include "rendering/renderer_rd/framebuffer_cache_rd.h"
64 #include "rendering/renderer_rd/storage_rd/render_data_rd.h"
65 #include "rendering/renderer_rd/storage_rd/render_scene_buffers_rd.h"
66 #include "rendering/renderer_rd/storage_rd/render_scene_data_rd.h"
67 #include "rendering/renderer_rd/uniform_set_cache_rd.h"
68 #include "rendering/rendering_device.h"
69 #include "rendering/rendering_device_binds.h"
70 #include "rendering/rendering_server.h"
71 #include "rendering/shader_include_db.h"
72 #include "rendering/storage/render_data.h"
73 #include "rendering/storage/render_scene_buffers.h"
74 #include "rendering/storage/render_scene_data.h"
75 #include "servers/rendering/shader_types.h"
76 #include "text/text_server.h"
77 #include "text/text_server_dummy.h"
78 #include "text/text_server_extension.h"
79 #ifndef DISABLE_DEPRECATED
80 #include "audio/effects/audio_effect_limiter.h"
81 #endif
82
83 // 2D physics and navigation.
84 #ifndef NAVIGATION_2D_DISABLED
85 #include "servers/navigation_2d/navigation_server_2d.h"
86 #endif // NAVIGATION_2D_DISABLED
87 #ifndef PHYSICS_2D_DISABLED
88 #include "servers/physics_2d/physics_server_2d.h"
89 #include "servers/physics_2d/physics_server_2d_dummy.h"
90 #include "servers/physics_2d/physics_server_2d_extension.h"
91 #endif // PHYSICS_2D_DISABLED
92
93 // 3D physics and navigation.
94 #ifndef NAVIGATION_3D_DISABLED
95 #include "servers/navigation_3d/navigation_server_3d.h"
96 #endif // NAVIGATION_3D_DISABLED
97 #ifndef PHYSICS_3D_DISABLED
98 #include "servers/physics_3d/physics_server_3d.h"
99 #include "servers/physics_3d/physics_server_3d_dummy.h"
100 #include "servers/physics_3d/physics_server_3d_extension.h"
101 #endif // PHYSICS_3D_DISABLED
102 #ifndef XR_DISABLED
103 #include "xr/xr_body_tracker.h"
104 #include "xr/xr_controller_tracker.h"
105 #include "xr/xr_face_tracker.h"
106 #include "xr/xr_hand_tracker.h"
107 #include "xr/xr_interface.h"
108 #include "xr/xr_interface_extension.h"
109 #include "xr/xr_positional_tracker.h"
110 #include "xr/xr_server.h"
111 #endif // XR_DISABLED
112
113 ShaderTypes *shader_types = nullptr;
114
115 #ifndef PHYSICS_2D_DISABLED
116 static PhysicsServer2D *_create_dummy_physics_server_2d() {
117 return memnew(PhysicsServer2DDummy);
118 }
119 #endif // PHYSICS_2D_DISABLED
120
121 #ifndef PHYSICS_3D_DISABLED
122 static PhysicsServer3D *_create_dummy_physics_server_3d() {
123 return memnew(PhysicsServer3DDummy);
124 }
125 #endif // PHYSICS_3D_DISABLED
126
127 static bool has_server_feature_callback(const String &p_feature) {
128 if (RenderingServer::get_singleton()) {
129 if (RenderingServer::get_singleton()->has_os_feature(p_feature)) {
130 return true;
131 }
132 }
133
134 return false;
135 }
136
137 static MovieWriterPNGWAV *writer_pngwav = nullptr;
138
139 void register_server_types() {
140 OS::get_singleton()->benchmark_begin_measure("Servers", "Register Extensions");
141
142 shader_types = memnew(ShaderTypes);
143
144 GDREGISTER_CLASS(TextServerManager);
145 GDREGISTER_ABSTRACT_CLASS(TextServer);
146 GDREGISTER_CLASS(TextServerExtension);
147 GDREGISTER_CLASS(TextServerDummy);
148
149 GDREGISTER_NATIVE_STRUCT(Glyph, "int start = -1;int end = -1;uint8_t count = 0;uint8_t repeat = 1;uint16_t flags = 0;float x_off = 0.f;float y_off = 0.f;float advance = 0.f;RID font_rid;int font_size = 0;int32_t index = 0");
150 GDREGISTER_NATIVE_STRUCT(CaretInfo, "Rect2 leading_caret;Rect2 trailing_caret;TextServer::Direction leading_direction;TextServer::Direction trailing_direction");
151
152 Engine::get_singleton()->add_singleton(Engine::Singleton("TextServerManager", TextServerManager::get_singleton(), "TextServerManager"));
153
154 OS::get_singleton()->set_has_server_feature_callback(has_server_feature_callback);
155
156 GDREGISTER_ABSTRACT_CLASS(DisplayServer);
157 GDREGISTER_ABSTRACT_CLASS(RenderingServer);
158 GDREGISTER_CLASS(AudioServer);
159
160 GDREGISTER_CLASS(NativeMenu);
161
162 GDREGISTER_CLASS(CameraServer);
163
164 GDREGISTER_ABSTRACT_CLASS(RenderingDevice);
165
166 GDREGISTER_CLASS(AudioStream);
167 GDREGISTER_CLASS(AudioStreamPlayback);
168 GDREGISTER_VIRTUAL_CLASS(AudioStreamPlaybackResampled);
169 GDREGISTER_CLASS(AudioStreamMicrophone);
170 GDREGISTER_CLASS(AudioStreamRandomizer);
171 GDREGISTER_CLASS(AudioSample);
172 GDREGISTER_CLASS(AudioSamplePlayback);
173 GDREGISTER_VIRTUAL_CLASS(AudioEffect);
174 GDREGISTER_VIRTUAL_CLASS(AudioEffectInstance);
175 GDREGISTER_CLASS(AudioEffectEQ);
176 GDREGISTER_CLASS(AudioEffectFilter);
177 GDREGISTER_CLASS(AudioBusLayout);
178
179 GDREGISTER_CLASS(AudioStreamGenerator);
180 GDREGISTER_ABSTRACT_CLASS(AudioStreamGeneratorPlayback);
181
182 {
183 //audio effects
184 GDREGISTER_CLASS(AudioEffectAmplify);
185
186 GDREGISTER_CLASS(AudioEffectReverb);
187
188 GDREGISTER_CLASS(AudioEffectLowPassFilter);
189 GDREGISTER_CLASS(AudioEffectHighPassFilter);
190 GDREGISTER_CLASS(AudioEffectBandPassFilter);
191 GDREGISTER_CLASS(AudioEffectNotchFilter);
192 GDREGISTER_CLASS(AudioEffectBandLimitFilter);
193 GDREGISTER_CLASS(AudioEffectLowShelfFilter);
194 GDREGISTER_CLASS(AudioEffectHighShelfFilter);
195
196 GDREGISTER_CLASS(AudioEffectEQ6);
197 GDREGISTER_CLASS(AudioEffectEQ10);
198 GDREGISTER_CLASS(AudioEffectEQ21);
199
200 GDREGISTER_CLASS(AudioEffectDistortion);
201
202 GDREGISTER_CLASS(AudioEffectStereoEnhance);
203
204 GDREGISTER_CLASS(AudioEffectPanner);
205 GDREGISTER_CLASS(AudioEffectChorus);
206 GDREGISTER_CLASS(AudioEffectDelay);
207 GDREGISTER_CLASS(AudioEffectCompressor);
208 GDREGISTER_CLASS(AudioEffectHardLimiter);
209 GDREGISTER_CLASS(AudioEffectPitchShift);
210 GDREGISTER_CLASS(AudioEffectPhaser);
211 GDREGISTER_CLASS(AudioEffectRecord);
212 GDREGISTER_CLASS(AudioEffectSpectrumAnalyzer);
213 GDREGISTER_ABSTRACT_CLASS(AudioEffectSpectrumAnalyzerInstance);
214
215 GDREGISTER_CLASS(AudioEffectCapture);
216
217 #ifndef DISABLE_DEPRECATED
218 GDREGISTER_CLASS(AudioEffectLimiter);
219 #endif
220 }
221
222 GDREGISTER_ABSTRACT_CLASS(RenderingDevice);
223 GDREGISTER_CLASS(ShaderIncludeDB);
224 GDREGISTER_CLASS(RDTextureFormat);
225 GDREGISTER_CLASS(RDTextureView);
226 GDREGISTER_CLASS(RDAttachmentFormat);
227 GDREGISTER_CLASS(RDFramebufferPass);
228 GDREGISTER_CLASS(RDSamplerState);
229 GDREGISTER_CLASS(RDVertexAttribute);
230 GDREGISTER_CLASS(RDUniform);
231 GDREGISTER_CLASS(RDPipelineRasterizationState);
232 GDREGISTER_CLASS(RDPipelineMultisampleState);
233 GDREGISTER_CLASS(RDPipelineDepthStencilState);
234 GDREGISTER_CLASS(RDPipelineColorBlendStateAttachment);
235 GDREGISTER_CLASS(RDPipelineColorBlendState);
236 GDREGISTER_CLASS(RDShaderSource);
237 GDREGISTER_CLASS(RDShaderSPIRV);
238 GDREGISTER_CLASS(RDShaderFile);
239 GDREGISTER_CLASS(RDPipelineSpecializationConstant);
240
241 GDREGISTER_ABSTRACT_CLASS(RenderData);
242 GDREGISTER_CLASS(RenderDataExtension);
243 GDREGISTER_CLASS(RenderDataRD);
244
245 GDREGISTER_ABSTRACT_CLASS(RenderSceneData);
246 GDREGISTER_CLASS(RenderSceneDataExtension);
247 GDREGISTER_CLASS(RenderSceneDataRD);
248
249 GDREGISTER_CLASS(RenderSceneBuffersConfiguration);
250 GDREGISTER_ABSTRACT_CLASS(RenderSceneBuffers);
251 GDREGISTER_CLASS(RenderSceneBuffersExtension);
252 GDREGISTER_CLASS(RenderSceneBuffersRD);
253
254 GDREGISTER_CLASS(FramebufferCacheRD);
255 GDREGISTER_CLASS(UniformSetCacheRD);
256
257 GDREGISTER_CLASS(CameraFeed);
258
259 GDREGISTER_VIRTUAL_CLASS(MovieWriter);
260
261 ServersDebugger::initialize();
262
263 #ifndef NAVIGATION_2D_DISABLED
264 GDREGISTER_CLASS(NavigationServer2DManager);
265 Engine::get_singleton()->add_singleton(Engine::Singleton("NavigationServer2DManager", NavigationServer2DManager::get_singleton(), "NavigationServer2DManager"));
266
267 GDREGISTER_ABSTRACT_CLASS(NavigationServer2D);
268 GDREGISTER_CLASS(NavigationPathQueryParameters2D);
269 GDREGISTER_CLASS(NavigationPathQueryResult2D);
270
271 GLOBAL_DEF(PropertyInfo(Variant::STRING, NavigationServer2DManager::setting_property_name, PROPERTY_HINT_ENUM, "DEFAULT"), "DEFAULT");
272
273 NavigationServer2DManager::get_singleton()->register_server("Dummy", callable_mp_static(NavigationServer2DManager::create_dummy_server_callback));
274 #endif // NAVIGATION_2D_DISABLED
275
276 #ifndef PHYSICS_2D_DISABLED
277 // Physics 2D
278 GDREGISTER_CLASS(PhysicsServer2DManager);
279 Engine::get_singleton()->add_singleton(Engine::Singleton("PhysicsServer2DManager", PhysicsServer2DManager::get_singleton(), "PhysicsServer2DManager"));
280
281 GDREGISTER_ABSTRACT_CLASS(PhysicsServer2D);
282 GDREGISTER_VIRTUAL_CLASS(PhysicsServer2DExtension);
283 GDREGISTER_ABSTRACT_CLASS(PhysicsDirectBodyState2D);
284 GDREGISTER_VIRTUAL_CLASS(PhysicsDirectBodyState2DExtension);
285 GDREGISTER_ABSTRACT_CLASS(PhysicsDirectSpaceState2D);
286 GDREGISTER_VIRTUAL_CLASS(PhysicsDirectSpaceState2DExtension);
287
288 GDREGISTER_NATIVE_STRUCT(PhysicsServer2DExtensionRayResult, "Vector2 position;Vector2 normal;RID rid;ObjectID collider_id;Object *collider;int shape");
289 GDREGISTER_NATIVE_STRUCT(PhysicsServer2DExtensionShapeResult, "RID rid;ObjectID collider_id;Object *collider;int shape");
290 GDREGISTER_NATIVE_STRUCT(PhysicsServer2DExtensionShapeRestInfo, "Vector2 point;Vector2 normal;RID rid;ObjectID collider_id;int shape;Vector2 linear_velocity");
291 GDREGISTER_NATIVE_STRUCT(PhysicsServer2DExtensionMotionResult, "Vector2 travel;Vector2 remainder;Vector2 collision_point;Vector2 collision_normal;Vector2 collider_velocity;real_t collision_depth;real_t collision_safe_fraction;real_t collision_unsafe_fraction;int collision_local_shape;ObjectID collider_id;RID collider;int collider_shape");
292
293 GDREGISTER_CLASS(PhysicsRayQueryParameters2D);
294 GDREGISTER_CLASS(PhysicsPointQueryParameters2D);
295 GDREGISTER_CLASS(PhysicsShapeQueryParameters2D);
296 GDREGISTER_CLASS(PhysicsTestMotionParameters2D);
297 GDREGISTER_CLASS(PhysicsTestMotionResult2D);
298
299 GLOBAL_DEF(PropertyInfo(Variant::STRING, PhysicsServer2DManager::setting_property_name, PROPERTY_HINT_ENUM, "DEFAULT"), "DEFAULT");
300
301 PhysicsServer2DManager::get_singleton()->register_server("Dummy", callable_mp_static(_create_dummy_physics_server_2d));
302 #endif // PHYSICS_2D_DISABLED
303
304 #ifndef NAVIGATION_3D_DISABLED
305 GDREGISTER_CLASS(NavigationServer3DManager);
306 Engine::get_singleton()->add_singleton(Engine::Singleton("NavigationServer3DManager", NavigationServer3DManager::get_singleton(), "NavigationServer3DManager"));
307
308 GDREGISTER_ABSTRACT_CLASS(NavigationServer3D);
309 GDREGISTER_CLASS(NavigationPathQueryParameters3D);
310 GDREGISTER_CLASS(NavigationPathQueryResult3D);
311
312 GLOBAL_DEF(PropertyInfo(Variant::STRING, NavigationServer3DManager::setting_property_name, PROPERTY_HINT_ENUM, "DEFAULT"), "DEFAULT");
313
314 NavigationServer3DManager::get_singleton()->register_server("Dummy", callable_mp_static(NavigationServer3DManager::create_dummy_server_callback));
315 #endif // NAVIGATION_3D_DISABLED
316
317 #ifndef PHYSICS_3D_DISABLED
318 // Physics 3D
319 GDREGISTER_CLASS(PhysicsServer3DManager);
320 Engine::get_singleton()->add_singleton(Engine::Singleton("PhysicsServer3DManager", PhysicsServer3DManager::get_singleton(), "PhysicsServer3DManager"));
321
322 GDREGISTER_ABSTRACT_CLASS(PhysicsServer3D);
323 GDREGISTER_VIRTUAL_CLASS(PhysicsServer3DExtension);
324 GDREGISTER_ABSTRACT_CLASS(PhysicsDirectBodyState3D);
325 GDREGISTER_VIRTUAL_CLASS(PhysicsDirectBodyState3DExtension);
326 GDREGISTER_ABSTRACT_CLASS(PhysicsDirectSpaceState3D);
327 GDREGISTER_VIRTUAL_CLASS(PhysicsDirectSpaceState3DExtension)
328 GDREGISTER_VIRTUAL_CLASS(PhysicsServer3DRenderingServerHandler)
329
330 GDREGISTER_NATIVE_STRUCT(PhysicsServer3DExtensionRayResult, "Vector3 position;Vector3 normal;RID rid;ObjectID collider_id;Object *collider;int shape;int face_index");
331 GDREGISTER_NATIVE_STRUCT(PhysicsServer3DExtensionShapeResult, "RID rid;ObjectID collider_id;Object *collider;int shape");
332 GDREGISTER_NATIVE_STRUCT(PhysicsServer3DExtensionShapeRestInfo, "Vector3 point;Vector3 normal;RID rid;ObjectID collider_id;int shape;Vector3 linear_velocity");
333 GDREGISTER_NATIVE_STRUCT(PhysicsServer3DExtensionMotionCollision, "Vector3 position;Vector3 normal;Vector3 collider_velocity;Vector3 collider_angular_velocity;real_t depth;int local_shape;ObjectID collider_id;RID collider;int collider_shape");
334 GDREGISTER_NATIVE_STRUCT(PhysicsServer3DExtensionMotionResult, "Vector3 travel;Vector3 remainder;real_t collision_depth;real_t collision_safe_fraction;real_t collision_unsafe_fraction;PhysicsServer3DExtensionMotionCollision collisions[32];int collision_count");
335
336 GDREGISTER_CLASS(PhysicsRayQueryParameters3D);
337 GDREGISTER_CLASS(PhysicsPointQueryParameters3D);
338 GDREGISTER_CLASS(PhysicsShapeQueryParameters3D);
339 GDREGISTER_CLASS(PhysicsTestMotionParameters3D);
340 GDREGISTER_CLASS(PhysicsTestMotionResult3D);
341
342 GLOBAL_DEF(PropertyInfo(Variant::STRING, PhysicsServer3DManager::setting_property_name, PROPERTY_HINT_ENUM, "DEFAULT"), "DEFAULT");
343
344 PhysicsServer3DManager::get_singleton()->register_server("Dummy", callable_mp_static(_create_dummy_physics_server_3d));
345 #endif // PHYSICS_3D_DISABLED
346
347 #ifndef XR_DISABLED
348 GDREGISTER_ABSTRACT_CLASS(XRInterface);
349 GDREGISTER_ABSTRACT_CLASS(XRTracker);
350 GDREGISTER_CLASS(XRVRS);
351 GDREGISTER_CLASS(XRPositionalTracker);
352 GDREGISTER_CLASS(XRBodyTracker);
353 GDREGISTER_CLASS(XRControllerTracker);
354 GDREGISTER_CLASS(XRFaceTracker);
355 GDREGISTER_CLASS(XRHandTracker);
356 GDREGISTER_CLASS(XRInterfaceExtension); // can't register this as virtual because we need a creation function for our extensions.
357 GDREGISTER_CLASS(XRPose);
358 GDREGISTER_CLASS(XRServer);
359 #endif // XR_DISABLED
360
361 if constexpr (GD_IS_CLASS_ENABLED(MovieWriterPNGWAV)) {
362 writer_pngwav = memnew(MovieWriterPNGWAV);
363 MovieWriter::add_writer(writer_pngwav);
364 }
365
366 OS::get_singleton()->benchmark_end_measure("Servers", "Register Extensions");
367 }
368
369 void unregister_server_types() {
370 OS::get_singleton()->benchmark_begin_measure("Servers", "Unregister Extensions");
371
372 ServersDebugger::deinitialize();
373 memdelete(shader_types);
374 if constexpr (GD_IS_CLASS_ENABLED(MovieWriterPNGWAV)) {
375 memdelete(writer_pngwav);
376 }
377
378 OS::get_singleton()->benchmark_end_measure("Servers", "Unregister Extensions");
379 }
380
381 void register_server_singletons() {
382 OS::get_singleton()->benchmark_begin_measure("Servers", "Register Singletons");
383
384 Engine::get_singleton()->add_singleton(Engine::Singleton("AudioServer", AudioServer::get_singleton(), "AudioServer"));
385 Engine::get_singleton()->add_singleton(Engine::Singleton("CameraServer", CameraServer::get_singleton(), "CameraServer"));
386 Engine::get_singleton()->add_singleton(Engine::Singleton("DisplayServer", DisplayServer::get_singleton(), "DisplayServer"));
387 Engine::get_singleton()->add_singleton(Engine::Singleton("NativeMenu", NativeMenu::get_singleton(), "NativeMenu"));
388 Engine::get_singleton()->add_singleton(Engine::Singleton("RenderingServer", RenderingServer::get_singleton(), "RenderingServer"));
389 #ifndef NAVIGATION_2D_DISABLED
390 Engine::get_singleton()->add_singleton(Engine::Singleton("NavigationServer2D", NavigationServer2D::get_singleton(), "NavigationServer2D"));
391 #endif // NAVIGATION_2D_DISABLED
392 #ifndef NAVIGATION_3D_DISABLED
393 Engine::get_singleton()->add_singleton(Engine::Singleton("NavigationServer3D", NavigationServer3D::get_singleton(), "NavigationServer3D"));
394 #endif // NAVIGATION_3D_DISABLED
395 #ifndef PHYSICS_2D_DISABLED
396 Engine::get_singleton()->add_singleton(Engine::Singleton("PhysicsServer2D", PhysicsServer2D::get_singleton(), "PhysicsServer2D"));
397 #endif // PHYSICS_2D_DISABLED
398 #ifndef PHYSICS_3D_DISABLED
399 Engine::get_singleton()->add_singleton(Engine::Singleton("PhysicsServer3D", PhysicsServer3D::get_singleton(), "PhysicsServer3D"));
400 #endif // PHYSICS_3D_DISABLED
401 #ifndef XR_DISABLED
402 Engine::get_singleton()->add_singleton(Engine::Singleton("XRServer", XRServer::get_singleton(), "XRServer"));
403 #endif // XR_DISABLED
404
405 OS::get_singleton()->benchmark_end_measure("Servers", "Register Singletons");
406 }