evan
2026.1.4
Evan
Loading...
Searching...
No Matches
XrSwapchainImage.hpp
1
/*
2
** ETIB PROJECT, 2026
3
** evan
4
** File description:
5
** XrSwapchainImage
6
*/
7
8
#pragma once
9
10
#include "evan/ASwapchainImage.hpp"
11
#include "evan/DeviceContext.hpp"
12
13
#include <openxr/openxr.h>
14
15
namespace
evan
16
{
38
class
XrSwapchainImage
:
public
ASwapchainImage
39
{
40
public
:
55
struct
CreateXrSwapchainImageProperties
{
60
XrSwapchain
swapchain
;
66
XrSwapchainCreateInfo
createInfo
;
72
VkRenderPass
renderPass
;
79
const
DeviceContext
&
deviceContext
;
84
VkSampleCountFlagBits
msaaSamples
=
VK_SAMPLE_COUNT_1_BIT
;
95
ColorAttachmentMode
colorAttachmentMode
=
96
ColorAttachmentMode::SwapchainImageAttachment;
97
};
98
130
XrSwapchainImage
(
const
CreateXrSwapchainImageProperties
&
properties
);
131
136
~XrSwapchainImage
()
override
;
137
159
void
destroy
(
VkDevice
device
)
override
;
160
185
void
fillPresentInfo
(
VkPresentInfoKHR
&
presentInfo
)
const override
;
186
190
XrSwapchain
_swapchain
=
XR_NULL_HANDLE
;
191
207
uint32_t
_width
= 0;
208
223
uint32_t
_height
= 0;
224
225
private
:
233
void
cleanup();
234
239
VkDevice
_device =
VK_NULL_HANDLE
;
240
249
std::vector<XrSwapchainImageVulkan2KHR> _swapchainImages;
250
259
XrSwapchainImageBaseHeader
*_swapchainImagesBase =
nullptr
;
260
};
261
}
// namespace evan
evan::ASwapchainImage
ASwapchainImage is a class that represents an image in the swapchain of the Evan engine....
Definition
ASwapchainImage.hpp:42
evan::DeviceContext
Represents the device context for the engine, managing Vulkan-related resources and operations.
Definition
DeviceContext.hpp:39
evan::XrSwapchainImage
Represents a swapchain image for OpenXR rendering.
Definition
XrSwapchainImage.hpp:39
evan::XrSwapchainImage::_swapchain
XrSwapchain _swapchain
Definition
XrSwapchainImage.hpp:190
evan::XrSwapchainImage::_width
uint32_t _width
Definition
XrSwapchainImage.hpp:207
evan::XrSwapchainImage::~XrSwapchainImage
~XrSwapchainImage() override
Releases the swapchain image resources if they were not already destroyed through destroy().
Definition
XrSwapchainImage.cpp:71
evan::XrSwapchainImage::destroy
void destroy(VkDevice device) override
Destroys the swapchain images and releases associated resources.
Definition
XrSwapchainImage.cpp:77
evan::XrSwapchainImage::fillPresentInfo
void fillPresentInfo(VkPresentInfoKHR &presentInfo) const override
Fills the VkPresentInfoKHR structure with the necessary information for presenting the swapchain imag...
Definition
XrSwapchainImage.cpp:146
evan::XrSwapchainImage::_height
uint32_t _height
Definition
XrSwapchainImage.hpp:223
evan::Result
Small result wrapper used by helpers that must return both a status and a value (e....
Definition
Error.hpp:89
evan::XrSwapchainImage::CreateXrSwapchainImageProperties
Encapsulates properties for creating an XrSwapchainImage instance.
Definition
XrSwapchainImage.hpp:55
evan::XrSwapchainImage::CreateXrSwapchainImageProperties::deviceContext
const DeviceContext & deviceContext
A reference to the device context, which provides access to Vulkan device resources and operations ne...
Definition
XrSwapchainImage.hpp:79
evan::XrSwapchainImage::CreateXrSwapchainImageProperties::swapchain
XrSwapchain swapchain
The OpenXR swapchain handle associated with the swapchain images.
Definition
XrSwapchainImage.hpp:60
evan::XrSwapchainImage::CreateXrSwapchainImageProperties::createInfo
XrSwapchainCreateInfo createInfo
The swapchain creation info structure containing parameters for creating the swapchain images,...
Definition
XrSwapchainImage.hpp:66
evan::XrSwapchainImage::CreateXrSwapchainImageProperties::renderPass
VkRenderPass renderPass
The Vulkan render pass used for rendering operations with the swapchain images. It defines the render...
Definition
XrSwapchainImage.hpp:72
evan::XrSwapchainImage::CreateXrSwapchainImageProperties::msaaSamples
VkSampleCountFlagBits msaaSamples
The MSAA sample count to use for the color and depth resources created for this swapchain image.
Definition
XrSwapchainImage.hpp:84
evan::XrSwapchainImage::CreateXrSwapchainImageProperties::colorAttachmentMode
ColorAttachmentMode colorAttachmentMode
How the render pass obtains its single-sampled color attachment.
Definition
XrSwapchainImage.hpp:95
headers
evan
openxr
XrSwapchainImage.hpp
Generated by
1.9.8