10#include "evan/openxr/IXrPlatform.hpp"
11#include "evan/openxr/OpenXrOptions.hpp"
12#include "evan/openxr/XrManageActions.hpp"
14#include "evan/ADeviceBackend.hpp"
18#include <openxr/openxr.h>
19#include <openxr/openxr_platform.h>
22#define LEFT_HAND_INDEX 0
23#define RIGHT_HAND_INDEX 1
206 std::vector<XrViewConfigurationView>
228 std::vector<std::shared_ptr<utility::event::Event>>
pollActions();
253 return _viewConfigurationType;
265 return _openXrOptions;
275 std::vector<XrViewConfigurationType>
520 void createSession();
542 std::vector<const char *> getRequiredInstanceExtensions()
const;
554 std::vector<const char *> getRequiredInstanceExtensionsAndroid();
Abstract base class for Vulkan device backends.
Represents the context for managing the swapchain in the rendering system.
ASwapchainImage is a class that represents an image in the swapchain of the Evan engine....
Represents a software version using major, minor, and patch numbers.
The XrDeviceBackend class is responsible for managing the OpenXR device backend, including instance c...
void createLogicalDevice() override
Creates a logical device for the OpenXR session.
std::vector< int64_t > enumerateSwapchainFormats(uint32_t swapchainFormatCount) const override
Enumerates the available swapchain formats for the Vulkan device.
uint32_t countSwapchainFormats() const override
Count the number of available swapchain formats for the Vulkan device.
std::array< XrPath, _handCount > _handActionSubactionPath
const OpenXrOptions & getOpenXrOptions() const
Retrieves the user-configurable OpenXR options.
std::vector< VkExtensionProperties > getInstanceExtensions() const
XrSession getSession() const
Retrieves the OpenXR session handle.
void createVisualizedSpace()
Creates a visualized space for the XR session.
std::vector< std::shared_ptr< utility::event::Event > > pollActions()
Polls input actions for the OpenXR session.
Error postprocessFrame(ASwapchainContext &swapchainContext) override
Postprocesses a frame and submits it to the OpenXR compositor.
XrTime _predictedDisplayTime
std::vector< XrViewConfigurationType > enumerateViewConfigurationTypes() const
Enumerates the primary view configuration types supported by the OpenXR system.
void createInstance(const IPlatform &platform, const std::string &appName, Version &appVersion) override
Creates an OpenXR instance with the specified application name and version.
QueueFamilyIndices findQueueFamilies() override
Finds the queue family indices for graphics and presentation operations.
static const size_t _handCount
Error processFrame(VkPresentInfoKHR presentInfo, ASwapchainImage &swapchainImage) override
Processes a frame by releasing the OpenXR swapchain image.
static XrViewConfigurationType selectViewConfigurationType(const std::vector< XrViewConfigurationType > &configurations)
Selects a primary view configuration type from the ones supported by the runtime.
XrViewConfigurationType getViewConfigurationType() const
Retrieves the primary view configuration type selected for this OpenXR system.
Error preprocessFrame(ASwapchainContext &swapchainContext) override
Prepares the current frame for rendering in an OpenXR session.
std::unique_ptr< XrManageActions > _actionManager
The action manager for handling input actions in the OpenXR session.
std::vector< XrViewConfigurationView > enumerateViewConfigurations() const
Enumerates the available view configurations for the OpenXR system.
void pickPhysicalDevice() override
Picks a physical device that is compatible with the OpenXR session.
User-configurable options for the OpenXR backend.
A structure to represent Vulkan queue family indices.
Small result wrapper used by helpers that must return both a status and a value (e....