-
Notifications
You must be signed in to change notification settings - Fork 257
/
platformplugin.h
23 lines (17 loc) · 977 Bytes
/
platformplugin.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright (c) 2017-2024, The Khronos Group Inc.
//
// SPDX-License-Identifier: Apache-2.0
#pragma once
// Wraps platform-specific implementation so the main openxr program can be platform-independent.
struct IPlatformPlugin {
virtual ~IPlatformPlugin() = default;
// Provide extension to XrInstanceCreateInfo for xrCreateInstance.
virtual XrBaseInStructure* GetInstanceCreateExtension() const = 0;
// OpenXR instance-level extensions required by this platform.
virtual std::vector<std::string> GetInstanceExtensions() const = 0;
// Perform required steps after updating Options
virtual void UpdateOptions(const std::shared_ptr<struct Options>& options) = 0;
};
// Create a platform plugin for the platform specified at compile time.
std::shared_ptr<IPlatformPlugin> CreatePlatformPlugin(const std::shared_ptr<struct Options>& options,
const std::shared_ptr<struct PlatformData>& data);