API Documentation
Loading...
Searching...
No Matches
XRInstance.h
Go to the documentation of this file.
1#pragma once
2#include "DLLInfo.h"
7#include <openxr/openxr.h>
8#include <openxr/openxr_platform.h>
9class ID3D11DepthStencilView;
10struct VkDeviceCreateInfo;
11namespace NDEVR
12{
13 /**--------------------------------------------------------------------------------------------------
14 \brief he connection between the NDEVR API and the OpenXR library, using Vulkan as the engine backend.
15 **/
17 {
18 public:
21 VkResult createVkInstance(const VkInstanceCreateInfo& create_info) final override;
22 uint04 setupExtensions(const char**& extensions) final override;
23 void init() override;
26 virtual XrResult getVulkanGraphicsRequirements2KHR(XrInstance instance, XrSystemId systemId, XrGraphicsRequirementsVulkan2KHR* graphicsRequirements);
27 XrFormFactor formFactor() { return XrFormFactor::XR_FORM_FACTOR_HEAD_MOUNTED_DISPLAY; }
28 XrInstance xrInstance() const { return m_xr_instance; }
29 XrSystemId xrSystemID() const { return m_system_id; }
30 protected:
31
32 XrInstance m_xr_instance{ XR_NULL_HANDLE };
33 XrSystemId m_system_id{ XR_NULL_SYSTEM_ID };
34 };
35 /**--------------------------------------------------------------------------------------------------
36 \brief A GraphicsDevice for managing OpenXR and Vulkan limitations and actions. See VulkanDevice
37 **/
39 {
40 public:
42 void autoChoosePhysicalDevice() override;
43 VulkanXRInstance* vulkanXRInstance() const { return dynamic_cast<VulkanXRInstance*>(instance().rawptr()); }
44 XrInstance xrInstance() const { return vulkanXRInstance()->xrInstance(); }
45 XrSystemId xrSystemID() const { return vulkanXRInstance()->xrSystemID(); }
46 const XrGraphicsBindingVulkanKHR& graphicsBinding() const { return m_graphicsBinding; }
47 int64_t selectColorSwapchainFormat(const std::vector<int64_t>& runtimeFormats) const;
48 virtual VkResult createLogicalDevice(const VkDeviceCreateInfo& create_info);
49
50 protected:
51 XrGraphicsBindingVulkanKHR m_graphicsBinding{ XR_TYPE_GRAPHICS_BINDING_VULKAN2_KHR };
52 };
53}
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Definition Pointer.hpp:320
A GraphicsDevice for managing Vulkan limitations and actions. See: https://docs.vulkan....
Definition VulkanDevice.h:12
DynamicPointer< VulkanInstance > instance() const
The connection between the NDEVR API and the Vulkan library. See: https://vulkan-tutorial....
Definition VulkanInstance.h:82
A GraphicsDevice for managing OpenXR and Vulkan limitations and actions. See VulkanDevice.
Definition XRInstance.h:39
XrSystemId xrSystemID() const
Definition XRInstance.h:45
virtual VkResult createLogicalDevice(const VkDeviceCreateInfo &create_info)
const XrGraphicsBindingVulkanKHR & graphicsBinding() const
Definition XRInstance.h:46
void autoChoosePhysicalDevice() override
VulkanXRInstance * vulkanXRInstance() const
Definition XRInstance.h:43
VulkanXRDevice(const DynamicPointer< VulkanXRInstance > &instance)
XrInstance xrInstance() const
Definition XRInstance.h:44
XrGraphicsBindingVulkanKHR m_graphicsBinding
Definition XRInstance.h:51
int64_t selectColorSwapchainFormat(const std::vector< int64_t > &runtimeFormats) const
he connection between the NDEVR API and the OpenXR library, using Vulkan as the engine backend.
Definition XRInstance.h:17
XrInstance m_xr_instance
Definition XRInstance.h:32
XrSystemId xrSystemID() const
Definition XRInstance.h:29
XrFormFactor formFactor()
Definition XRInstance.h:27
VkResult createVkInstance(const VkInstanceCreateInfo &create_info) final override
virtual XrResult getVulkanGraphicsRequirements2KHR(XrInstance instance, XrSystemId systemId, XrGraphicsRequirementsVulkan2KHR *graphicsRequirements)
uint04 setupExtensions(const char **&extensions) final override
XrInstance xrInstance() const
Definition XRInstance.h:28
void init() override
XrSystemId m_system_id
Definition XRInstance.h:33
Definition ACIColor.h:37
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96