/**************************************************************************/ /* openxr_debug_utils_extension.cpp */ /**************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ /* https://godotengine.org */ /**************************************************************************/ /* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ /* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ /* "Software"), to deal in the Software without restriction, including */ /* without limitation the rights to use, copy, modify, merge, publish, */ /* distribute, sublicense, and/or sell copies of the Software, and to */ /* permit persons to whom the Software is furnished to do so, subject to */ /* the following conditions: */ /* */ /* The above copyright notice and this permission notice shall be */ /* included in all copies or substantial portions of the Software. */ /* */ /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ #include "openxr_debug_utils_extension.h" #include "../openxr_api.h" #include "core/config/project_settings.h" #include "core/string/print_string.h" #include <openxr/openxr.h> OpenXRDebugUtilsExtension *OpenXRDebugUtilsExtension::singleton = …; OpenXRDebugUtilsExtension *OpenXRDebugUtilsExtension::get_singleton() { … } OpenXRDebugUtilsExtension::OpenXRDebugUtilsExtension() { … } OpenXRDebugUtilsExtension::~OpenXRDebugUtilsExtension() { … } HashMap<String, bool *> OpenXRDebugUtilsExtension::get_requested_extensions() { … } void OpenXRDebugUtilsExtension::on_instance_created(const XrInstance p_instance) { … } void OpenXRDebugUtilsExtension::on_instance_destroyed() { … } bool OpenXRDebugUtilsExtension::get_active() { … } void OpenXRDebugUtilsExtension::set_object_name(XrObjectType p_object_type, uint64_t p_object_handle, const char *p_object_name) { … } void OpenXRDebugUtilsExtension::begin_debug_label_region(const char *p_label_name) { … } void OpenXRDebugUtilsExtension::end_debug_label_region() { … } void OpenXRDebugUtilsExtension::insert_debug_label(const char *p_label_name) { … } XrBool32 XRAPI_PTR OpenXRDebugUtilsExtension::_debug_callback(XrDebugUtilsMessageSeverityFlagsEXT p_message_severity, XrDebugUtilsMessageTypeFlagsEXT p_message_types, const XrDebugUtilsMessengerCallbackDataEXT *p_callback_data, void *p_user_data) { … } XrBool32 OpenXRDebugUtilsExtension::debug_callback(XrDebugUtilsMessageSeverityFlagsEXT p_message_severity, XrDebugUtilsMessageTypeFlagsEXT p_message_types, const XrDebugUtilsMessengerCallbackDataEXT *p_callback_data, void *p_user_data) { … }