forked from KhronosGroup/OpenXR-SDK-Source
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgraphicsapi.h
25 lines (17 loc) · 829 Bytes
/
graphicsapi.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright (c) 2017-2024, The Khronos Group Inc.
//
// SPDX-License-Identifier: Apache-2.0
#pragma once
struct IGraphicsAdapter {
virtual ~IGraphicsAdapter() = default;
virtual std::vector<std::string> GetInstanceExtensions() const = 0;
virtual const XrBaseInStructure* GetGraphicsBinding() const = 0;
};
struct IGraphicsApi {
virtual ~IGraphicsApi() = default;
virtual std::shared_ptr<IGraphicsAdapter> CreateAdapter(XrInstance instance, XrSystemId systemId) = 0;
// OpenXR extensions required by this graphics API.
virtual std::vector<std::string> GetInstanceExtensions() const = 0;
};
std::shared_ptr<IGraphicsApi> CreateGraphicsAPI(const std::shared_ptr<struct Options>& options,
std::shared_ptr<struct IPlatformAdapter> platformAdapter);