| @@ -62,8 +62,8 @@ target_sources(${PROJECT_NAME} PUBLIC | ||||
| 	src/main.cpp | ||||
| ) | ||||
| target_sources(${PROJECT_NAME} PUBLIC FILE_SET CXX_MODULES FILES | ||||
| 	src/Util.cppm | ||||
| 	src/Math.cppm | ||||
| 	src/Compositor.cppm | ||||
| 	src/LunarWM.cppm | ||||
| ) | ||||
| target_link_libraries(${PROJECT_NAME} PUBLIC | ||||
| @@ -80,7 +80,7 @@ target_link_libraries(${PROJECT_NAME} PUBLIC | ||||
| ) | ||||
|  | ||||
| set_target_properties(${PROJECT_NAME} PROPERTIES | ||||
| 	CXX_CLANG_TIDY "clang-tidy;-header-filter=^${CMAKE_SOURCE_DIR}/src/.*;-checks=*,-some-disabled-checks,misc-const-correctness,modernize-use-nullptr,bugprone-branch-clone,bugprone-use-after-move,performance-unnecessary-value-param,hicpp-no-malloc,cppcoreguidelines-pro-type-const-cast,clang-analyzer-core.NullDereference,-fuchsia-overloaded-operator,-readability-identifier-length,-bugprone-easily-swappable-parameters,-fuchsia-trailing-return,-misc-non-private-member-variables-in-classes,-readability-math-missing-parentheses,-llvmlibc-implementation-in-namespace,-misc-include-cleaner,-modernize-use-std-print,-llvmlibc-restrict-system-libc-headers,-fuchsia-statically-constructed-objects,-cppcoreguidelines-avoid-non-const-global-variables,-llvmlibc-callee-namespace,-misc-use-anonymous-namespace,-cppcoreguidelines-avoid-magic-numbers,-readability-magic-numbers,-hicpp-uppercase-literal-suffix,-readability-uppercase-literal-suffix,-fuchsia-default-arguments-calls,-altera-unroll-loops,-fuchsia-default-arguments-declarations,-readability-function-cognitive-complexity,-altera-struct-pack-align,-altera-id-dependent-backward-branch,-cppcoreguidelines-pro-type-reinterpret-cast,-boost-use-ranges,-cppcoreguidelines-owning-memory,-readability-redundant-declaration" | ||||
| 	CXX_CLANG_TIDY "clang-tidy;-header-filter=^${CMAKE_SOURCE_DIR}/src/.*;-checks=*,-some-disabled-checks,misc-const-correctness,modernize-use-nullptr,bugprone-branch-clone,bugprone-use-after-move,performance-unnecessary-value-param,hicpp-no-malloc,cppcoreguidelines-pro-type-const-cast,clang-analyzer-core.NullDereference,-fuchsia-overloaded-operator,-readability-identifier-length,-bugprone-easily-swappable-parameters,-fuchsia-trailing-return,-misc-non-private-member-variables-in-classes,-readability-math-missing-parentheses,-llvmlibc-implementation-in-namespace,-misc-include-cleaner,-modernize-use-std-print,-llvmlibc-restrict-system-libc-headers,-fuchsia-statically-constructed-objects,-cppcoreguidelines-avoid-non-const-global-variables,-llvmlibc-callee-namespace,-misc-use-anonymous-namespace,-cppcoreguidelines-avoid-magic-numbers,-readability-magic-numbers,-hicpp-uppercase-literal-suffix,-readability-uppercase-literal-suffix,-fuchsia-default-arguments-calls,-altera-unroll-loops,-fuchsia-default-arguments-declarations,-readability-function-cognitive-complexity,-altera-struct-pack-align,-altera-id-dependent-backward-branch,-cppcoreguidelines-pro-type-reinterpret-cast,-boost-use-ranges,-cppcoreguidelines-owning-memory,-readability-redundant-declaration,-bugprone-unchecked-optional-access" | ||||
| ) | ||||
|  | ||||
| # Wayland protocol codegen | ||||
|   | ||||
							
								
								
									
										722
									
								
								assets/hand_l.gltf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										722
									
								
								assets/hand_l.gltf
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										722
									
								
								assets/hand_r.gltf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										722
									
								
								assets/hand_r.gltf
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @@ -1,3 +0,0 @@ | ||||
| module; | ||||
|  | ||||
| export module LunarWM.Compositor; | ||||
							
								
								
									
										1069
									
								
								src/LunarWM.cppm
									
									
									
									
									
								
							
							
						
						
									
										1069
									
								
								src/LunarWM.cppm
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -218,4 +218,9 @@ requires std::is_arithmetic_v<T> struct Viewport { | ||||
| 	Vec2<T> depth_limits; | ||||
| }; | ||||
|  | ||||
| template<typename T> constexpr auto deg2rad(T degrees) -> T | ||||
| { | ||||
| 	return degrees * (std::numbers::pi / 180.0); | ||||
| } | ||||
|  | ||||
| } // namespace LunarWM::Math | ||||
|   | ||||
							
								
								
									
										676
									
								
								src/Util.cppm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										676
									
								
								src/Util.cppm
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,676 @@ | ||||
| module; | ||||
|  | ||||
| // NOLINTBEGIN | ||||
| #include <openxr/openxr.h> | ||||
| // NOLINTEND | ||||
|  | ||||
| export module LunarWM.Util; | ||||
|  | ||||
| import std; | ||||
|  | ||||
| namespace std { | ||||
| template<> struct formatter<XrResult, char> { | ||||
| 	template<class ParseContext> constexpr auto parse(ParseContext &ctx) | ||||
| 	{ | ||||
| 		return ctx.begin(); | ||||
| 	} | ||||
|  | ||||
| 	static constexpr auto to_string(XrResult r) -> std::string_view | ||||
| 	{ | ||||
| 		switch (r) { | ||||
| 		case XR_FRAME_DISCARDED: | ||||
| 			return "XR_FRAME_DISCARDED"; | ||||
| 		case XR_ERROR_VALIDATION_FAILURE: | ||||
| 			return "XR_ERROR_VALIDATION_FAILURE: The function usage was " | ||||
| 			       "invalid in " | ||||
| 			       "some way."; | ||||
| 		case XR_ERROR_RUNTIME_FAILURE: | ||||
| 			return "XR_ERROR_RUNTIME_FAILURE: The runtime failed to handle the " | ||||
| 			       "function in an unexpected way that is not covered by " | ||||
| 			       "another " | ||||
| 			       "error result."; | ||||
| 		case XR_ERROR_OUT_OF_MEMORY: | ||||
| 			return "XR_ERROR_OUT_OF_MEMORY: A memory allocation has failed."; | ||||
| 		case XR_ERROR_API_VERSION_UNSUPPORTED: | ||||
| 			return "XR_ERROR_API_VERSION_UNSUPPORTED: The runtime does not " | ||||
| 			       "support " | ||||
| 			       "the requested API version."; | ||||
| 		case XR_ERROR_INITIALIZATION_FAILED: | ||||
| 			return "XR_ERROR_INITIALIZATION_FAILED: Initialization of object " | ||||
| 			       "could " | ||||
| 			       "not be completed."; | ||||
| 		case XR_ERROR_FUNCTION_UNSUPPORTED: | ||||
| 			return "XR_ERROR_FUNCTION_UNSUPPORTED: The requested function was " | ||||
| 			       "not " | ||||
| 			       "found or is otherwise unsupported."; | ||||
| 		case XR_ERROR_FEATURE_UNSUPPORTED: | ||||
| 			return "XR_ERROR_FEATURE_UNSUPPORTED: The requested feature is not " | ||||
| 			       "supported."; | ||||
| 		case XR_ERROR_EXTENSION_NOT_PRESENT: | ||||
| 			return "XR_ERROR_EXTENSION_NOT_PRESENT: A requested extension is " | ||||
| 			       "not " | ||||
| 			       "supported."; | ||||
| 		case XR_ERROR_LIMIT_REACHED: | ||||
| 			return "XR_ERROR_LIMIT_REACHED: The runtime supports no more of " | ||||
| 			       "the " | ||||
| 			       "requested resource."; | ||||
| 		case XR_ERROR_SIZE_INSUFFICIENT: | ||||
| 			return "XR_ERROR_SIZE_INSUFFICIENT: The supplied size was smaller " | ||||
| 			       "than " | ||||
| 			       "required."; | ||||
| 		case XR_ERROR_HANDLE_INVALID: | ||||
| 			return "XR_ERROR_HANDLE_INVALID: A supplied object handle was " | ||||
| 			       "invalid."; | ||||
| 		case XR_ERROR_INSTANCE_LOST: | ||||
| 			return "XR_ERROR_INSTANCE_LOST: The XrInstance was lost or could " | ||||
| 			       "not be " | ||||
| 			       "found. It will need to be destroyed and optionally " | ||||
| 			       "recreated."; | ||||
| 		case XR_ERROR_SESSION_RUNNING: | ||||
| 			return "XR_ERROR_SESSION_RUNNING: The session is already running."; | ||||
| 		case XR_ERROR_SESSION_NOT_RUNNING: | ||||
| 			return "XR_ERROR_SESSION_NOT_RUNNING: The session is not yet " | ||||
| 			       "running."; | ||||
| 		case XR_ERROR_SESSION_LOST: | ||||
| 			return "XR_ERROR_SESSION_LOST: The XrSession was lost. It will " | ||||
| 			       "need to " | ||||
| 			       "be destroyed and optionally recreated."; | ||||
| 		case XR_ERROR_SYSTEM_INVALID: | ||||
| 			return "XR_ERROR_SYSTEM_INVALID: The provided XrSystemId was " | ||||
| 			       "invalid."; | ||||
| 		case XR_ERROR_PATH_INVALID: | ||||
| 			return "XR_ERROR_PATH_INVALID: The provided XrPath was not valid."; | ||||
| 		case XR_ERROR_PATH_COUNT_EXCEEDED: | ||||
| 			return "XR_ERROR_PATH_COUNT_EXCEEDED: The maximum number of " | ||||
| 			       "supported " | ||||
| 			       "semantic paths has been reached."; | ||||
| 		case XR_ERROR_PATH_FORMAT_INVALID: | ||||
| 			return "XR_ERROR_PATH_FORMAT_INVALID: The semantic path character " | ||||
| 			       "format " | ||||
| 			       "is invalid."; | ||||
| 		case XR_ERROR_PATH_UNSUPPORTED: | ||||
| 			return "XR_ERROR_PATH_UNSUPPORTED: The semantic path is " | ||||
| 			       "unsupported."; | ||||
| 		case XR_ERROR_LAYER_INVALID: | ||||
| 			return "XR_ERROR_LAYER_INVALID: The layer was NULL or otherwise " | ||||
| 			       "invalid."; | ||||
| 		case XR_ERROR_LAYER_LIMIT_EXCEEDED: | ||||
| 			return "XR_ERROR_LAYER_LIMIT_EXCEEDED: The number of specified " | ||||
| 			       "layers is " | ||||
| 			       "greater than the supported number."; | ||||
| 		case XR_ERROR_SWAPCHAIN_RECT_INVALID: | ||||
| 			return "XR_ERROR_SWAPCHAIN_RECT_INVALID: The image rect was " | ||||
| 			       "negatively " | ||||
| 			       "sized or otherwise invalid."; | ||||
| 		case XR_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED: | ||||
| 			return "XR_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED: The image format is " | ||||
| 			       "not " | ||||
| 			       "supported by the runtime or platform."; | ||||
| 		case XR_ERROR_ACTION_TYPE_MISMATCH: | ||||
| 			return "XR_ERROR_ACTION_TYPE_MISMATCH: The API used to retrieve an " | ||||
| 			       "action’s state does not match the action’s type."; | ||||
| 		case XR_ERROR_SESSION_NOT_READY: | ||||
| 			return "XR_ERROR_SESSION_NOT_READY: The session is not in the " | ||||
| 			       "ready " | ||||
| 			       "state."; | ||||
| 		case XR_ERROR_SESSION_NOT_STOPPING: | ||||
| 			return "XR_ERROR_SESSION_NOT_STOPPING: The session is not in the " | ||||
| 			       "stopping state."; | ||||
| 		case XR_ERROR_TIME_INVALID: | ||||
| 			return "XR_ERROR_TIME_INVALID: The provided XrTime was zero, " | ||||
| 			       "negative, " | ||||
| 			       "or out of range."; | ||||
| 		case XR_ERROR_REFERENCE_SPACE_UNSUPPORTED: | ||||
| 			return "XR_ERROR_REFERENCE_SPACE_UNSUPPORTED: The specified " | ||||
| 			       "reference " | ||||
| 			       "space is not supported by the runtime or system."; | ||||
| 		case XR_ERROR_FILE_ACCESS_ERROR: | ||||
| 			return "XR_ERROR_FILE_ACCESS_ERROR: The file could not be " | ||||
| 			       "accessed."; | ||||
| 		case XR_ERROR_FILE_CONTENTS_INVALID: | ||||
| 			return "XR_ERROR_FILE_CONTENTS_INVALID: The file’s contents were " | ||||
| 			       "invalid."; | ||||
| 		case XR_ERROR_FORM_FACTOR_UNSUPPORTED: | ||||
| 			return "XR_ERROR_FORM_FACTOR_UNSUPPORTED: The specified form " | ||||
| 			       "factor is " | ||||
| 			       "not supported by the current runtime or platform."; | ||||
| 		case XR_ERROR_FORM_FACTOR_UNAVAILABLE: | ||||
| 			return "XR_ERROR_FORM_FACTOR_UNAVAILABLE: The specified form " | ||||
| 			       "factor is " | ||||
| 			       "supported, but the device is currently not available, e.g. " | ||||
| 			       "not " | ||||
| 			       "plugged in or powered off."; | ||||
| 		case XR_ERROR_API_LAYER_NOT_PRESENT: | ||||
| 			return "XR_ERROR_API_LAYER_NOT_PRESENT: A requested API layer is " | ||||
| 			       "not " | ||||
| 			       "present or could not be loaded."; | ||||
| 		case XR_ERROR_CALL_ORDER_INVALID: | ||||
| 			return "XR_ERROR_CALL_ORDER_INVALID: The call was made without " | ||||
| 			       "having " | ||||
| 			       "made a previously required call."; | ||||
| 		case XR_ERROR_GRAPHICS_DEVICE_INVALID: | ||||
| 			return "XR_ERROR_GRAPHICS_DEVICE_INVALID: The given graphics " | ||||
| 			       "device is " | ||||
| 			       "not in a valid state. The graphics device could be lost or " | ||||
| 			       "initialized without meeting graphics requirements."; | ||||
| 		case XR_ERROR_POSE_INVALID: | ||||
| 			return "XR_ERROR_POSE_INVALID: The supplied pose was invalid with " | ||||
| 			       "respect to the requirements."; | ||||
| 		case XR_ERROR_INDEX_OUT_OF_RANGE: | ||||
| 			return "XR_ERROR_INDEX_OUT_OF_RANGE: The supplied index was " | ||||
| 			       "outside the " | ||||
| 			       "range of valid indices."; | ||||
| 		case XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED: | ||||
| 			return "XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED: The " | ||||
| 			       "specified view " | ||||
| 			       "configuration type is not supported by the runtime or " | ||||
| 			       "platform."; | ||||
| 		case XR_ERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTED: | ||||
| 			return "XR_ERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTED: The specified " | ||||
| 			       "environment blend mode is not supported by the runtime or " | ||||
| 			       "platform."; | ||||
| 		case XR_ERROR_NAME_DUPLICATED: | ||||
| 			return "XR_ERROR_NAME_DUPLICATED: The name provided was a " | ||||
| 			       "duplicate of " | ||||
| 			       "an already-existing resource."; | ||||
| 		case XR_ERROR_NAME_INVALID: | ||||
| 			return "XR_ERROR_NAME_INVALID: The name provided was invalid."; | ||||
| 		case XR_ERROR_ACTIONSET_NOT_ATTACHED: | ||||
| 			return "XR_ERROR_ACTIONSET_NOT_ATTACHED: A referenced action set " | ||||
| 			       "is not " | ||||
| 			       "attached to the session."; | ||||
| 		case XR_ERROR_ACTIONSETS_ALREADY_ATTACHED: | ||||
| 			return "XR_ERROR_ACTIONSETS_ALREADY_ATTACHED: The session already " | ||||
| 			       "has " | ||||
| 			       "attached action sets."; | ||||
| 		case XR_ERROR_LOCALIZED_NAME_DUPLICATED: | ||||
| 			return "XR_ERROR_LOCALIZED_NAME_DUPLICATED: The localized name " | ||||
| 			       "provided " | ||||
| 			       "was a duplicate of an already-existing resource."; | ||||
| 		case XR_ERROR_LOCALIZED_NAME_INVALID: | ||||
| 			return "XR_ERROR_LOCALIZED_NAME_INVALID: The localized name " | ||||
| 			       "provided was " | ||||
| 			       "invalid."; | ||||
| 		case XR_ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING: | ||||
| 			return "XR_ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING: The " | ||||
| 			       "xrGetGraphicsRequirements* call was not made before " | ||||
| 			       "calling " | ||||
| 			       "xrCreateSession."; | ||||
| 		case XR_ERROR_RUNTIME_UNAVAILABLE: | ||||
| 			return "XR_ERROR_RUNTIME_UNAVAILABLE: The loader was unable to " | ||||
| 			       "find or " | ||||
| 			       "load a runtime."; | ||||
| 		case XR_ERROR_EXTENSION_DEPENDENCY_NOT_ENABLED: | ||||
| 			return "XR_ERROR_EXTENSION_DEPENDENCY_NOT_ENABLED: One or more of " | ||||
| 			       "the " | ||||
| 			       "extensions being enabled has dependency on extensions that " | ||||
| 			       "are " | ||||
| 			       "not enabled."; | ||||
| 		case XR_ERROR_PERMISSION_INSUFFICIENT: | ||||
| 			return "XR_ERROR_PERMISSION_INSUFFICIENT: Insufficient " | ||||
| 			       "permissions. This " | ||||
| 			       "error is included for use by vendor extensions. The " | ||||
| 			       "precise " | ||||
| 			       "definition of XR_ERROR_PERMISSION_INSUFFICIENT and actions " | ||||
| 			       "possible by the developer or user to resolve it can vary " | ||||
| 			       "by " | ||||
| 			       "platform, extension or function. The developer should " | ||||
| 			       "refer to " | ||||
| 			       "the documentation of the function that returned the error " | ||||
| 			       "code " | ||||
| 			       "and extension it was defined."; | ||||
| 		case XR_ERROR_ANDROID_THREAD_SETTINGS_ID_INVALID_KHR: | ||||
| 			return "XR_ERROR_ANDROID_THREAD_SETTINGS_ID_INVALID_KHR: " | ||||
| 			       "xrSetAndroidApplicationThreadKHR failed as thread id is " | ||||
| 			       "invalid. " | ||||
| 			       "(Added by the XR_KHR_android_thread_settings extension)"; | ||||
| 		case XR_ERROR_ANDROID_THREAD_SETTINGS_FAILURE_KHR: | ||||
| 			return "XR_ERROR_ANDROID_THREAD_SETTINGS_FAILURE_KHR: " | ||||
| 			       "xrSetAndroidApplicationThreadKHR failed setting the thread " | ||||
| 			       "attributes/priority. (Added by the " | ||||
| 			       "XR_KHR_android_thread_settings extension)"; | ||||
| 		case XR_ERROR_CREATE_SPATIAL_ANCHOR_FAILED_MSFT: | ||||
| 			return "XR_ERROR_CREATE_SPATIAL_ANCHOR_FAILED_MSFT: Spatial anchor " | ||||
| 			       "could " | ||||
| 			       "not be created at that location. (Added by the " | ||||
| 			       "XR_MSFT_spatial_anchor extension)"; | ||||
| 		case XR_ERROR_SECONDARY_VIEW_CONFIGURATION_TYPE_NOT_ENABLED_MSFT: | ||||
| 			return "XR_ERROR_SECONDARY_VIEW_CONFIGURATION_TYPE_NOT_ENABLED_" | ||||
| 			       "MSFT: The " | ||||
| 			       "secondary view configuration was not enabled when creating " | ||||
| 			       "the " | ||||
| 			       "session. (Added by the " | ||||
| 			       "XR_MSFT_secondary_view_configuration " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_CONTROLLER_MODEL_KEY_INVALID_MSFT: | ||||
| 			return "XR_ERROR_CONTROLLER_MODEL_KEY_INVALID_MSFT: The controller " | ||||
| 			       "model " | ||||
| 			       "key is invalid. (Added by the XR_MSFT_controller_model " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_REPROJECTION_MODE_UNSUPPORTED_MSFT: | ||||
| 			return "XR_ERROR_REPROJECTION_MODE_UNSUPPORTED_MSFT: The " | ||||
| 			       "reprojection " | ||||
| 			       "mode is not supported. (Added by the " | ||||
| 			       "XR_MSFT_composition_layer_reprojection extension)"; | ||||
| 		case XR_ERROR_COMPUTE_NEW_SCENE_NOT_COMPLETED_MSFT: | ||||
| 			return "XR_ERROR_COMPUTE_NEW_SCENE_NOT_COMPLETED_MSFT: Compute new " | ||||
| 			       "scene " | ||||
| 			       "not completed. (Added by the XR_MSFT_scene_understanding " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_SCENE_COMPONENT_ID_INVALID_MSFT: | ||||
| 			return "XR_ERROR_SCENE_COMPONENT_ID_INVALID_MSFT: Scene component " | ||||
| 			       "id " | ||||
| 			       "invalid. (Added by the XR_MSFT_scene_understanding " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_SCENE_COMPONENT_TYPE_MISMATCH_MSFT: | ||||
| 			return "XR_ERROR_SCENE_COMPONENT_TYPE_MISMATCH_MSFT: Scene " | ||||
| 			       "component " | ||||
| 			       "type mismatch. (Added by the XR_MSFT_scene_understanding " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_SCENE_MESH_BUFFER_ID_INVALID_MSFT: | ||||
| 			return "XR_ERROR_SCENE_MESH_BUFFER_ID_INVALID_MSFT: Scene mesh " | ||||
| 			       "buffer id " | ||||
| 			       "invalid. (Added by the XR_MSFT_scene_understanding " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_SCENE_COMPUTE_FEATURE_INCOMPATIBLE_MSFT: | ||||
| 			return "XR_ERROR_SCENE_COMPUTE_FEATURE_INCOMPATIBLE_MSFT: Scene " | ||||
| 			       "compute " | ||||
| 			       "feature incompatible. (Added by the " | ||||
| 			       "XR_MSFT_scene_understanding " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_SCENE_COMPUTE_CONSISTENCY_MISMATCH_MSFT: | ||||
| 			return "XR_ERROR_SCENE_COMPUTE_CONSISTENCY_MISMATCH_MSFT: Scene " | ||||
| 			       "compute " | ||||
| 			       "consistency mismatch. (Added by the " | ||||
| 			       "XR_MSFT_scene_understanding " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_DISPLAY_REFRESH_RATE_UNSUPPORTED_FB: | ||||
| 			return "XR_ERROR_DISPLAY_REFRESH_RATE_UNSUPPORTED_FB: The display " | ||||
| 			       "refresh rate is not supported by the platform. (Added by " | ||||
| 			       "the " | ||||
| 			       "XR_FB_display_refresh_rate extension)"; | ||||
| 		case XR_ERROR_COLOR_SPACE_UNSUPPORTED_FB: | ||||
| 			return "XR_ERROR_COLOR_SPACE_UNSUPPORTED_FB: The color space is " | ||||
| 			       "not " | ||||
| 			       "supported by the runtime. (Added by the XR_FB_color_space " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_SPACE_COMPONENT_NOT_SUPPORTED_FB: | ||||
| 			return "XR_ERROR_SPACE_COMPONENT_NOT_SUPPORTED_FB: The component " | ||||
| 			       "type is " | ||||
| 			       "not supported for this space. (Added by the " | ||||
| 			       "XR_FB_spatial_entity " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_SPACE_COMPONENT_NOT_ENABLED_FB: | ||||
| 			return "XR_ERROR_SPACE_COMPONENT_NOT_ENABLED_FB: The required " | ||||
| 			       "component " | ||||
| 			       "is not enabled for this space. (Added by the " | ||||
| 			       "XR_FB_spatial_entity extension)"; | ||||
| 		case XR_ERROR_SPACE_COMPONENT_STATUS_PENDING_FB: | ||||
| 			return "XR_ERROR_SPACE_COMPONENT_STATUS_PENDING_FB: A request to " | ||||
| 			       "set the " | ||||
| 			       "component’s status is currently pending. (Added by the " | ||||
| 			       "XR_FB_spatial_entity extension)"; | ||||
| 		case XR_ERROR_SPACE_COMPONENT_STATUS_ALREADY_SET_FB: | ||||
| 			return "XR_ERROR_SPACE_COMPONENT_STATUS_ALREADY_SET_FB: The " | ||||
| 			       "component is " | ||||
| 			       "already set to the requested value. (Added by the " | ||||
| 			       "XR_FB_spatial_entity extension)"; | ||||
| 		case XR_ERROR_UNEXPECTED_STATE_PASSTHROUGH_FB: | ||||
| 			return "XR_ERROR_UNEXPECTED_STATE_PASSTHROUGH_FB: The object state " | ||||
| 			       "is " | ||||
| 			       "unexpected for the issued command. (Added by the " | ||||
| 			       "XR_FB_passthrough extension)"; | ||||
| 		case XR_ERROR_FEATURE_ALREADY_CREATED_PASSTHROUGH_FB: | ||||
| 			return "XR_ERROR_FEATURE_ALREADY_CREATED_PASSTHROUGH_FB: Trying to " | ||||
| 			       "create an MR feature when one was already created and only " | ||||
| 			       "one " | ||||
| 			       "instance is allowed. (Added by the XR_FB_passthrough " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_FEATURE_REQUIRED_PASSTHROUGH_FB: | ||||
| 			return "XR_ERROR_FEATURE_REQUIRED_PASSTHROUGH_FB: Requested " | ||||
| 			       "functionality requires a feature to be created first. " | ||||
| 			       "(Added by " | ||||
| 			       "the XR_FB_passthrough extension)"; | ||||
| 		case XR_ERROR_NOT_PERMITTED_PASSTHROUGH_FB: | ||||
| 			return "XR_ERROR_NOT_PERMITTED_PASSTHROUGH_FB: Requested " | ||||
| 			       "functionality " | ||||
| 			       "is not permitted - application is not allowed to perform " | ||||
| 			       "the " | ||||
| 			       "requested operation. (Added by the XR_FB_passthrough " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_INSUFFICIENT_RESOURCES_PASSTHROUGH_FB: | ||||
| 			return "XR_ERROR_INSUFFICIENT_RESOURCES_PASSTHROUGH_FB: There were " | ||||
| 			       "insufficient resources available to perform an operation. " | ||||
| 			       "(Added " | ||||
| 			       "by the XR_FB_passthrough extension)"; | ||||
| 		case XR_ERROR_UNKNOWN_PASSTHROUGH_FB: | ||||
| 			return "XR_ERROR_UNKNOWN_PASSTHROUGH_FB: Unknown Passthrough error " | ||||
| 			       "(no " | ||||
| 			       "further details provided). (Added by the XR_FB_passthrough " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_RENDER_MODEL_KEY_INVALID_FB: | ||||
| 			return "XR_ERROR_RENDER_MODEL_KEY_INVALID_FB: The model key is " | ||||
| 			       "invalid. " | ||||
| 			       "(Added by the XR_FB_render_model extension)"; | ||||
| 		case XR_ERROR_MARKER_NOT_TRACKED_VARJO: | ||||
| 			return "XR_ERROR_MARKER_NOT_TRACKED_VARJO: Marker tracking is " | ||||
| 			       "disabled " | ||||
| 			       "or the specified marker is not currently tracked. (Added " | ||||
| 			       "by the " | ||||
| 			       "XR_VARJO_marker_tracking extension)"; | ||||
| 		case XR_ERROR_MARKER_ID_INVALID_VARJO: | ||||
| 			return "XR_ERROR_MARKER_ID_INVALID_VARJO: The specified marker ID " | ||||
| 			       "is not " | ||||
| 			       "valid. (Added by the XR_VARJO_marker_tracking extension)"; | ||||
| 		case XR_ERROR_MARKER_DETECTOR_PERMISSION_DENIED_ML: | ||||
| 			return "XR_ERROR_MARKER_DETECTOR_PERMISSION_DENIED_ML: The " | ||||
| 			       "com.magicleap.permission.MARKER_TRACKING permission was " | ||||
| 			       "denied. " | ||||
| 			       "(Added by the XR_ML_marker_understanding extension)"; | ||||
| 		case XR_ERROR_MARKER_DETECTOR_LOCATE_FAILED_ML: | ||||
| 			return "XR_ERROR_MARKER_DETECTOR_LOCATE_FAILED_ML: The specified " | ||||
| 			       "marker " | ||||
| 			       "could not be located spatially. (Added by the " | ||||
| 			       "XR_ML_marker_understanding extension)"; | ||||
| 		case XR_ERROR_MARKER_DETECTOR_INVALID_DATA_QUERY_ML: | ||||
| 			return "XR_ERROR_MARKER_DETECTOR_INVALID_DATA_QUERY_ML: The marker " | ||||
| 			       "queried does not contain data of the requested type. " | ||||
| 			       "(Added by " | ||||
| 			       "the XR_ML_marker_understanding extension)"; | ||||
| 		case XR_ERROR_MARKER_DETECTOR_INVALID_CREATE_INFO_ML: | ||||
| 			return "XR_ERROR_MARKER_DETECTOR_INVALID_CREATE_INFO_ML: " | ||||
| 			       "createInfo " | ||||
| 			       "contains mutually exclusive parameters, such as setting " | ||||
| 			       "XR_MARKER_DETECTOR_CORNER_REFINE_METHOD_APRIL_TAG_ML with " | ||||
| 			       "XR_MARKER_TYPE_ARUCO_ML. (Added by the " | ||||
| 			       "XR_ML_marker_understanding extension)"; | ||||
| 		case XR_ERROR_MARKER_INVALID_ML: | ||||
| 			return "XR_ERROR_MARKER_INVALID_ML: The marker id passed to the " | ||||
| 			       "function " | ||||
| 			       "was invalid. (Added by the XR_ML_marker_understanding " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_LOCALIZATION_MAP_INCOMPATIBLE_ML: | ||||
| 			return "XR_ERROR_LOCALIZATION_MAP_INCOMPATIBLE_ML: The " | ||||
| 			       "localization map " | ||||
| 			       "being imported is not compatible with current OS or mode. " | ||||
| 			       "(Added " | ||||
| 			       "by the XR_ML_localization_map extension)"; | ||||
| 		case XR_ERROR_LOCALIZATION_MAP_UNAVAILABLE_ML: | ||||
| 			return "XR_ERROR_LOCALIZATION_MAP_UNAVAILABLE_ML: The localization " | ||||
| 			       "map " | ||||
| 			       "requested is not available. (Added by the " | ||||
| 			       "XR_ML_localization_map " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_LOCALIZATION_MAP_FAIL_ML: | ||||
| 			return "XR_ERROR_LOCALIZATION_MAP_FAIL_ML: The map localization " | ||||
| 			       "service " | ||||
| 			       "failed to fulfill the request, retry later. (Added by the " | ||||
| 			       "XR_ML_localization_map extension)"; | ||||
| 		case XR_ERROR_LOCALIZATION_MAP_IMPORT_EXPORT_PERMISSION_DENIED_ML: | ||||
| 			return "XR_ERROR_LOCALIZATION_MAP_IMPORT_EXPORT_PERMISSION_DENIED_" | ||||
| 			       "ML: " | ||||
| 			       "The com.magicleap.permission.SPACE_IMPORT_EXPORT " | ||||
| 			       "permission was " | ||||
| 			       "denied. (Added by the XR_ML_localization_map extension)"; | ||||
| 		case XR_ERROR_LOCALIZATION_MAP_PERMISSION_DENIED_ML: | ||||
| 			return "XR_ERROR_LOCALIZATION_MAP_PERMISSION_DENIED_ML: The " | ||||
| 			       "com.magicleap.permission.SPACE_MANAGER permission was " | ||||
| 			       "denied. " | ||||
| 			       "(Added by the XR_ML_localization_map extension)"; | ||||
| 		case XR_ERROR_LOCALIZATION_MAP_ALREADY_EXISTS_ML: | ||||
| 			return "XR_ERROR_LOCALIZATION_MAP_ALREADY_EXISTS_ML: The map being " | ||||
| 			       "imported already exists in the system. (Added by the " | ||||
| 			       "XR_ML_localization_map extension)"; | ||||
| 		case XR_ERROR_LOCALIZATION_MAP_CANNOT_EXPORT_CLOUD_MAP_ML: | ||||
| 			return "XR_ERROR_LOCALIZATION_MAP_CANNOT_EXPORT_CLOUD_MAP_ML: The " | ||||
| 			       "map " | ||||
| 			       "localization service cannot export cloud based maps. " | ||||
| 			       "(Added by " | ||||
| 			       "the XR_ML_localization_map extension)"; | ||||
| 		case XR_ERROR_SPATIAL_ANCHORS_PERMISSION_DENIED_ML: | ||||
| 			return "XR_ERROR_SPATIAL_ANCHORS_PERMISSION_DENIED_ML: The " | ||||
| 			       "com.magicleap.permission.SPATIAL_ANCHOR permission was not " | ||||
| 			       "granted. (Added by the XR_ML_spatial_anchors extension)"; | ||||
| 		case XR_ERROR_SPATIAL_ANCHORS_NOT_LOCALIZED_ML: | ||||
| 			return "XR_ERROR_SPATIAL_ANCHORS_NOT_LOCALIZED_ML: Operation " | ||||
| 			       "failed " | ||||
| 			       "because the system is not localized into a localization " | ||||
| 			       "map. " | ||||
| 			       "(Added by the XR_ML_spatial_anchors extension)"; | ||||
| 		case XR_ERROR_SPATIAL_ANCHORS_OUT_OF_MAP_BOUNDS_ML: | ||||
| 			return "XR_ERROR_SPATIAL_ANCHORS_OUT_OF_MAP_BOUNDS_ML: Operation " | ||||
| 			       "failed " | ||||
| 			       "because it is performed outside of the localization map. " | ||||
| 			       "(Added " | ||||
| 			       "by the XR_ML_spatial_anchors extension)"; | ||||
| 		case XR_ERROR_SPATIAL_ANCHORS_SPACE_NOT_LOCATABLE_ML: | ||||
| 			return "XR_ERROR_SPATIAL_ANCHORS_SPACE_NOT_LOCATABLE_ML: Operation " | ||||
| 			       "failed because the space referenced cannot be located. " | ||||
| 			       "(Added by " | ||||
| 			       "the XR_ML_spatial_anchors extension)"; | ||||
| 		case XR_ERROR_SPATIAL_ANCHORS_ANCHOR_NOT_FOUND_ML: | ||||
| 			return "XR_ERROR_SPATIAL_ANCHORS_ANCHOR_NOT_FOUND_ML: The anchor " | ||||
| 			       "references was not found. (Added by the " | ||||
| 			       "XR_ML_spatial_anchors_storage extension)"; | ||||
| 		case XR_ERROR_SPATIAL_ANCHOR_NAME_NOT_FOUND_MSFT: | ||||
| 			return "XR_ERROR_SPATIAL_ANCHOR_NAME_NOT_FOUND_MSFT: A spatial " | ||||
| 			       "anchor " | ||||
| 			       "was not found associated with the spatial anchor name " | ||||
| 			       "provided " | ||||
| 			       "(Added by the XR_MSFT_spatial_anchor_persistence " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_SPATIAL_ANCHOR_NAME_INVALID_MSFT: | ||||
| 			return "XR_ERROR_SPATIAL_ANCHOR_NAME_INVALID_MSFT: The spatial " | ||||
| 			       "anchor " | ||||
| 			       "name provided was not valid (Added by the " | ||||
| 			       "XR_MSFT_spatial_anchor_persistence extension)"; | ||||
| 		case XR_ERROR_SPACE_MAPPING_INSUFFICIENT_FB: | ||||
| 			return "XR_ERROR_SPACE_MAPPING_INSUFFICIENT_FB: Anchor import from " | ||||
| 			       "cloud " | ||||
| 			       "or export from device failed. (Added by the " | ||||
| 			       "XR_FB_spatial_entity_sharing extension)"; | ||||
| 		case XR_ERROR_SPACE_LOCALIZATION_FAILED_FB: | ||||
| 			return "XR_ERROR_SPACE_LOCALIZATION_FAILED_FB: Anchors were " | ||||
| 			       "downloaded " | ||||
| 			       "from the cloud but failed to be imported/aligned on the " | ||||
| 			       "device. " | ||||
| 			       "(Added by the XR_FB_spatial_entity_sharing extension)"; | ||||
| 		case XR_ERROR_SPACE_NETWORK_TIMEOUT_FB: | ||||
| 			return "XR_ERROR_SPACE_NETWORK_TIMEOUT_FB: Timeout occurred while " | ||||
| 			       "waiting for network request to complete. (Added by the " | ||||
| 			       "XR_FB_spatial_entity_sharing extension)"; | ||||
| 		case XR_ERROR_SPACE_NETWORK_REQUEST_FAILED_FB: | ||||
| 			return "XR_ERROR_SPACE_NETWORK_REQUEST_FAILED_FB: The network " | ||||
| 			       "request " | ||||
| 			       "failed. (Added by the XR_FB_spatial_entity_sharing " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_SPACE_CLOUD_STORAGE_DISABLED_FB: | ||||
| 			return "XR_ERROR_SPACE_CLOUD_STORAGE_DISABLED_FB: Cloud storage is " | ||||
| 			       "required for this operation but is currently disabled. " | ||||
| 			       "(Added by " | ||||
| 			       "the XR_FB_spatial_entity_sharing extension)"; | ||||
| 		case XR_ERROR_PASSTHROUGH_COLOR_LUT_BUFFER_SIZE_MISMATCH_META: | ||||
| 			return "XR_ERROR_PASSTHROUGH_COLOR_LUT_BUFFER_SIZE_MISMATCH_META: " | ||||
| 			       "The " | ||||
| 			       "provided data buffer did not match the required size. " | ||||
| 			       "(Added by " | ||||
| 			       "the XR_META_passthrough_color_lut extension)"; | ||||
| 		case XR_ERROR_RENDER_MODEL_ID_INVALID_EXT: | ||||
| 			return "XR_ERROR_RENDER_MODEL_ID_INVALID_EXT: The render model ID " | ||||
| 			       "is " | ||||
| 			       "invalid. (Added by the XR_EXT_render_model extension)"; | ||||
| 		case XR_ERROR_RENDER_MODEL_ASSET_UNAVAILABLE_EXT: | ||||
| 			return "XR_ERROR_RENDER_MODEL_ASSET_UNAVAILABLE_EXT: The render " | ||||
| 			       "model " | ||||
| 			       "asset is unavailable. (Added by the XR_EXT_render_model " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_RENDER_MODEL_GLTF_EXTENSION_REQUIRED_EXT: | ||||
| 			return "XR_ERROR_RENDER_MODEL_GLTF_EXTENSION_REQUIRED_EXT: A glTF " | ||||
| 			       "extension is required. (Added by the XR_EXT_render_model " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_NOT_INTERACTION_RENDER_MODEL_EXT: | ||||
| 			return "XR_ERROR_NOT_INTERACTION_RENDER_MODEL_EXT: The provided " | ||||
| 			       "XrRenderModelEXT was not created from a XrRenderModelIdEXT " | ||||
| 			       "from " | ||||
| 			       "[XR_EXT_interaction_render_model] (Added by the " | ||||
| 			       "XR_EXT_interaction_render_model extension)"; | ||||
| 		case XR_ERROR_HINT_ALREADY_SET_QCOM: | ||||
| 			return "XR_ERROR_HINT_ALREADY_SET_QCOM: Tracking optimization hint " | ||||
| 			       "is " | ||||
| 			       "already set for the domain. (Added by the " | ||||
| 			       "XR_QCOM_tracking_optimization_settings extension)"; | ||||
| 		case XR_ERROR_NOT_AN_ANCHOR_HTC: | ||||
| 			return "XR_ERROR_NOT_AN_ANCHOR_HTC: The provided space is valid " | ||||
| 			       "but not " | ||||
| 			       "an anchor. (Added by the XR_HTC_anchor extension)"; | ||||
| 		case XR_ERROR_SPATIAL_ENTITY_ID_INVALID_BD: | ||||
| 			return "XR_ERROR_SPATIAL_ENTITY_ID_INVALID_BD: The spatial entity " | ||||
| 			       "id is " | ||||
| 			       "invalid. (Added by the XR_BD_spatial_sensing extension)"; | ||||
| 		case XR_ERROR_SPATIAL_SENSING_SERVICE_UNAVAILABLE_BD: | ||||
| 			return "XR_ERROR_SPATIAL_SENSING_SERVICE_UNAVAILABLE_BD: The " | ||||
| 			       "spatial " | ||||
| 			       "sensing service is unavailable. (Added by the " | ||||
| 			       "XR_BD_spatial_sensing extension)"; | ||||
| 		case XR_ERROR_ANCHOR_NOT_SUPPORTED_FOR_ENTITY_BD: | ||||
| 			return "XR_ERROR_ANCHOR_NOT_SUPPORTED_FOR_ENTITY_BD: The spatial " | ||||
| 			       "entity " | ||||
| 			       "does not support anchor. (Added by the " | ||||
| 			       "XR_BD_spatial_sensing " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_SCENE_CAPTURE_FAILURE_BD: | ||||
| 			return "XR_ERROR_SCENE_CAPTURE_FAILURE_BD: The scene capture is " | ||||
| 			       "failed, " | ||||
| 			       "for example exiting abnormally. (Added by the " | ||||
| 			       "XR_BD_spatial_scene extension)"; | ||||
| 		case XR_ERROR_SPACE_NOT_LOCATABLE_EXT: | ||||
| 			return "XR_ERROR_SPACE_NOT_LOCATABLE_EXT: The space passed to the " | ||||
| 			       "function was not locatable. (Added by the " | ||||
| 			       "XR_EXT_plane_detection " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_PLANE_DETECTION_PERMISSION_DENIED_EXT: | ||||
| 			return "XR_ERROR_PLANE_DETECTION_PERMISSION_DENIED_EXT: The " | ||||
| 			       "permission " | ||||
| 			       "for this resource was not granted. (Added by the " | ||||
| 			       "XR_EXT_plane_detection extension)"; | ||||
| 		case XR_ERROR_FUTURE_PENDING_EXT: | ||||
| 			return "XR_ERROR_FUTURE_PENDING_EXT: Returned by completion " | ||||
| 			       "function to " | ||||
| 			       "indicate future is not ready. (Added by the XR_EXT_future " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_FUTURE_INVALID_EXT: | ||||
| 			return "XR_ERROR_FUTURE_INVALID_EXT: Returned by completion " | ||||
| 			       "function to " | ||||
| 			       "indicate future is not valid. (Added by the XR_EXT_future " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_SYSTEM_NOTIFICATION_PERMISSION_DENIED_ML: | ||||
| 			return "XR_ERROR_SYSTEM_NOTIFICATION_PERMISSION_DENIED_ML: The " | ||||
| 			       "com.magicleap.permission.SYSTEM_NOTIFICATION permission " | ||||
| 			       "was not " | ||||
| 			       "granted. (Added by the XR_ML_system_notifications " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_SYSTEM_NOTIFICATION_INCOMPATIBLE_SKU_ML: | ||||
| 			return "XR_ERROR_SYSTEM_NOTIFICATION_INCOMPATIBLE_SKU_ML: " | ||||
| 			       "Incompatible " | ||||
| 			       "SKU detected. (Added by the XR_ML_system_notifications " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_WORLD_MESH_DETECTOR_PERMISSION_DENIED_ML: | ||||
| 			return "XR_ERROR_WORLD_MESH_DETECTOR_PERMISSION_DENIED_ML: The " | ||||
| 			       "world " | ||||
| 			       "mesh detector permission was not granted. (Added by the " | ||||
| 			       "XR_ML_world_mesh_detection extension)"; | ||||
| 		case XR_ERROR_WORLD_MESH_DETECTOR_SPACE_NOT_LOCATABLE_ML: | ||||
| 			return "XR_ERROR_WORLD_MESH_DETECTOR_SPACE_NOT_LOCATABLE_ML: At " | ||||
| 			       "the time " | ||||
| 			       "of the call the runtime was unable to locate the space and " | ||||
| 			       "cannot fulfill your request. (Added by the " | ||||
| 			       "XR_ML_world_mesh_detection extension)"; | ||||
| 		case XR_ERROR_COLOCATION_DISCOVERY_NETWORK_FAILED_META: | ||||
| 			return "XR_ERROR_COLOCATION_DISCOVERY_NETWORK_FAILED_META: The " | ||||
| 			       "network " | ||||
| 			       "request failed. (Added by the XR_META_colocation_discovery " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_COLOCATION_DISCOVERY_NO_DISCOVERY_METHOD_META: | ||||
| 			return "XR_ERROR_COLOCATION_DISCOVERY_NO_DISCOVERY_METHOD_META: " | ||||
| 			       "The " | ||||
| 			       "runtime does not have any methods available to perform " | ||||
| 			       "discovery. (Added by the XR_META_colocation_discovery " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_SPACE_GROUP_NOT_FOUND_META: | ||||
| 			return "XR_ERROR_SPACE_GROUP_NOT_FOUND_META: The group UUID was " | ||||
| 			       "not " | ||||
| 			       "found within the runtime (Added by the " | ||||
| 			       "XR_META_spatial_entity_group_sharing extension)"; | ||||
| 		case XR_ERROR_SPATIAL_CAPABILITY_UNSUPPORTED_EXT: | ||||
| 			return "XR_ERROR_SPATIAL_CAPABILITY_UNSUPPORTED_EXT: The specified " | ||||
| 			       "spatial capability is not supported by the runtime or the " | ||||
| 			       "system. (Added by the XR_EXT_spatial_entity extension)"; | ||||
| 		case XR_ERROR_SPATIAL_ENTITY_ID_INVALID_EXT: | ||||
| 			return "XR_ERROR_SPATIAL_ENTITY_ID_INVALID_EXT: The specified " | ||||
| 			       "spatial " | ||||
| 			       "entity id is invalid or an entity with that id does not " | ||||
| 			       "exist in " | ||||
| 			       "the environment. (Added by the XR_EXT_spatial_entity " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_SPATIAL_BUFFER_ID_INVALID_EXT: | ||||
| 			return "XR_ERROR_SPATIAL_BUFFER_ID_INVALID_EXT: The specified " | ||||
| 			       "spatial " | ||||
| 			       "buffer id is invalid or does not exist in the spatial " | ||||
| 			       "snapshot " | ||||
| 			       "being used to query for the buffer data. (Added by the " | ||||
| 			       "XR_EXT_spatial_entity extension)"; | ||||
| 		case XR_ERROR_SPATIAL_COMPONENT_UNSUPPORTED_FOR_CAPABILITY_EXT: | ||||
| 			return "XR_ERROR_SPATIAL_COMPONENT_UNSUPPORTED_FOR_CAPABILITY_EXT: " | ||||
| 			       "The " | ||||
| 			       "specified spatial component is not supported by the " | ||||
| 			       "runtime or " | ||||
| 			       "the system for the given capability. (Added by the " | ||||
| 			       "XR_EXT_spatial_entity extension)"; | ||||
| 		case XR_ERROR_SPATIAL_CAPABILITY_CONFIGURATION_INVALID_EXT: | ||||
| 			return "XR_ERROR_SPATIAL_CAPABILITY_CONFIGURATION_INVALID_EXT: The " | ||||
| 			       "specified spatial capability configuration is invalid. " | ||||
| 			       "(Added by " | ||||
| 			       "the XR_EXT_spatial_entity extension)"; | ||||
| 		case XR_ERROR_SPATIAL_COMPONENT_NOT_ENABLED_EXT: | ||||
| 			return "XR_ERROR_SPATIAL_COMPONENT_NOT_ENABLED_EXT: The specified " | ||||
| 			       "spatial component is not enabled for the spatial context. " | ||||
| 			       "(Added " | ||||
| 			       "by the XR_EXT_spatial_entity extension)"; | ||||
| 		case XR_ERROR_SPATIAL_PERSISTENCE_SCOPE_UNSUPPORTED_EXT: | ||||
| 			return "XR_ERROR_SPATIAL_PERSISTENCE_SCOPE_UNSUPPORTED_EXT: The " | ||||
| 			       "specified spatial persistence scope is not supported by " | ||||
| 			       "the " | ||||
| 			       "runtime or the system. (Added by the " | ||||
| 			       "XR_EXT_spatial_persistence " | ||||
| 			       "extension)"; | ||||
| 		case XR_ERROR_SPATIAL_PERSISTENCE_SCOPE_INCOMPATIBLE_EXT: | ||||
| 			return "XR_ERROR_SPATIAL_PERSISTENCE_SCOPE_INCOMPATIBLE_EXT: THe " | ||||
| 			       "scope " | ||||
| 			       "configured for the persistence context is incompatible for " | ||||
| 			       "the " | ||||
| 			       "current spatial entity. (Added by the " | ||||
| 			       "XR_EXT_spatial_persistence_operations extension)"; | ||||
| 		default: | ||||
| 			return ""; | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	template<class FmtCtx> auto format(XrResult r, FmtCtx &ctx) const | ||||
| 	{ | ||||
| 		if (spec == 'd') { | ||||
| 			return format_to(ctx.out(), "{}", static_cast<int32_t>(r)); | ||||
| 		} | ||||
|  | ||||
| 		std::string_view str = std::formatter<XrResult, char>::to_string(r); | ||||
| 		if (!str.empty()) { | ||||
| 			return format_to(ctx.out(), "{}", str); | ||||
| 		} | ||||
|  | ||||
| 		return format_to(ctx.out(), "<0x{:x}>", static_cast<uint32_t>(r)); | ||||
| 	} | ||||
|  | ||||
| private: | ||||
| 	char spec { 's' }; | ||||
| }; | ||||
|  | ||||
| } // namespace std | ||||
		Reference in New Issue
	
	Block a user