NDEVR
API Documentation
XRVulkanPipeline.h
1#pragma once
2#include "XRInterface/Headers/XRInstance.h"
3#include "XRInterface/Headers/XRErrorHandling.h"
4#include "VulkanGraphics/Headers/VulkanRenderPipeline.h"
5#include "NDEVRGraphics/Headers/GraphicsUpdateArguments.h"
6namespace NDEVR
7{
11 class XRVulkanPipeline : public VulkanRenderPipeline
12 {
13 public:
14 XRVulkanPipeline(VulkanSession* vsession, const DynamicPointer<VulkanXRDevice>& device, XrSession session, const XrViewConfigurationView& config_view);
15
16 void init();
17 void setImageFormat();
18
19 virtual void recreateSwapChainResources(GraphicsUpdateArguments& args) override;
20 virtual void cleanupKHR() override {}
21 virtual bool createSwapChainKHR(GraphicsUpdateArguments& args) override;
22 XrSwapchain xrSwapChain() { return (XrSwapchain)(m_khr_swap_chain); }
23 bool needsRecreateSwapchain(GraphicsUpdateArguments&) override { return false; }
24 virtual bool executeDrawCycle(GraphicsUpdateArguments& args) override;
25 virtual void submitQueue(GraphicsUpdateArguments& args) override;
26 void createKHRImages(uint04 multisample_count);
27
28 virtual XrStructureType GetSwapchainImageType() const { return XR_TYPE_SWAPCHAIN_IMAGE_VULKAN2_KHR; }
29 XrSession xrSession() const { return m_session; }
30 const XrBaseInStructure* graphicsBinding() const { return reinterpret_cast<const XrBaseInStructure*>(&m_device->graphicsBinding()); }
31 XrEnvironmentBlendMode environmentBlendMode() { return m_current_blend_mode; }
32 XrInstance xrInstance() const { return m_device->xrInstance(); }
33 XrSystemId xrSystemID() const { return m_device->xrSystemID(); }
34 void setCurrentBlendMode(XrEnvironmentBlendMode blend_mode) { m_current_blend_mode = blend_mode; };
35 protected:
36 Buffer<XrSwapchainImageVulkan2KHR> m_swapchain_images;
37 XrEnvironmentBlendMode m_current_blend_mode;
39 XrViewConfigurationView m_config_view;
40 XrSession m_session{ XR_NULL_HANDLE };
42 std::vector<XrView> m_views;
43 };
44}
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Definition Pointer.hpp:356
Options that are used for performing an update on a Graphics Engine call.
virtual const ConstPointer< GraphicsDevice > & device() const override
Returns the graphics device (const).
VkSwapchainKHR m_khr_swap_chain
The KHR swap chain handle.
Creates and manages the resources necessary for converting a DesignObjectLookup into 3D rendered data...
The primary namespace for the NDEVR SDK.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...