godot/thirdparty/openxr/src/loader/loader_instance.cpp

// Copyright (c) 2017-2024, The Khronos Group Inc.
// Copyright (c) 2017-2019 Valve Corporation
// Copyright (c) 2017-2019 LunarG, Inc.
//
// SPDX-License-Identifier: Apache-2.0 OR MIT
//
// Initial Author: Mark Young <[email protected]>
//

#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)
#define _CRT_SECURE_NO_WARNINGS
#endif  // defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)

#include "loader_instance.hpp"

#include "api_layer_interface.hpp"
#include "hex_and_handles.h"
#include "loader_logger.hpp"
#include "runtime_interface.hpp"
#include "xr_generated_dispatch_table_core.h"
#include "xr_generated_loader.hpp"

#include <openxr/openxr.h>
#include <openxr/openxr_loader_negotiation.h>

#include <cstring>
#include <memory>
#include <sstream>
#include <string>
#include <utility>
#include <vector>

namespace {
std::unique_ptr<LoaderInstance>& GetSetCurrentLoaderInstance() {}
}  // namespace

namespace ActiveLoaderInstance {
XrResult Set(std::unique_ptr<LoaderInstance> loader_instance, const char* log_function_name) {}

XrResult Get(LoaderInstance** loader_instance, const char* log_function_name) {}

bool IsAvailable() {}

void Remove() {}
}  // namespace ActiveLoaderInstance

// Extensions that are supported by the loader, but may not be supported
// the the runtime.
const std::array<XrExtensionProperties, 1>& LoaderInstance::LoaderSpecificExtensions() {}

namespace {
class InstanceCreateInfoManager {};
}  // namespace

// Factory method
XrResult LoaderInstance::CreateInstance(PFN_xrGetInstanceProcAddr get_instance_proc_addr_term,
                                        PFN_xrCreateInstance create_instance_term,
                                        PFN_xrCreateApiLayerInstance create_api_layer_instance_term,
                                        std::vector<std::unique_ptr<ApiLayerInterface>> api_layer_interfaces,
                                        const XrInstanceCreateInfo* info, std::unique_ptr<LoaderInstance>* loader_instance) {}

XrResult LoaderInstance::GetInstanceProcAddr(const char* name, PFN_xrVoidFunction* function) {}

LoaderInstance::LoaderInstance(XrInstance instance, const XrInstanceCreateInfo* create_info, PFN_xrGetInstanceProcAddr topmost_gipa,
                               std::vector<std::unique_ptr<ApiLayerInterface>> api_layer_interfaces)
    :{}

LoaderInstance::~LoaderInstance() {}

bool LoaderInstance::ExtensionIsEnabled(const std::string& extension) {}