Skip to content

KDGpuExample::XrQuadLayer

#include <xr_quad_layer.h>

Inherits from KDGpuExample::XrCompositorLayer

Inherited by KDGpuExample::XrQuadImGuiLayer

Public Functions

Name
XrQuadLayer(const XrQuadLayerOptions & options)
~XrQuadLayer() override
XrQuadLayer(const XrQuadLayer & ) =delete
XrQuadLayer & operator=(const XrQuadLayer & ) =delete
XrQuadLayer(XrQuadLayer && ) =default
XrQuadLayer & operator=(XrQuadLayer && ) =default

Protected Functions

Name
virtual void initialize() override
virtual void cleanup() override
virtual bool update(const KDXr::FrameState & frameState) override
void recreateSwapchains()
virtual void renderQuad() =0
virtual KDXr::CompositionLayer * compositionLayer() override

Public Attributes

Name
KDBindings::Property< KDXr::Vector3 > position
KDBindings::Property< KDXr::Quaternion > orientation
KDBindings::Property< KDGpu::Extent2D > resolution
KDBindings::Property< KDGpu::Extent2Df > worldSize
KDBindings::Property< KDXr::EyeVisibility > eyeVisibility

Protected Attributes

Name
KDGpu::Device * m_device
KDGpu::Queue * m_queue
KDXr::Session * m_session
KDGpu::Format m_colorSwapchainFormat
KDGpu::Format m_depthSwapchainFormat
KDGpu::SampleCountFlagBits m_samples
KDXr::SwapchainInfo m_colorSwapchain
KDXr::SwapchainInfo m_depthSwapchain
uint32_t m_currentColorImageIndex
uint32_t m_currentDepthImageIndex
KDXr::QuadLayer m_quadLayer

Additional inherited members

Public Types inherited from KDGpuExample::XrCompositorLayer

Name
enum class uint32_t Type { Projection, Quad, Cylinder, Cube, Equirect, PassThrough}

Public Functions inherited from KDGpuExample::XrCompositorLayer

Name
virtual ~XrCompositorLayer()
XrCompositorLayer(const XrCompositorLayer & ) =delete
XrCompositorLayer(XrCompositorLayer && ) =default
Type type() const
void setReferenceSpace(const KDGpu::Handle< KDXr::ReferenceSpace_t > & referenceSpace)
KDGpu::Handle< KDXr::ReferenceSpace_t > referenceSpace() const
const XrExampleEngineLayer * engineLayer() const
XrExampleEngineLayer * engineLayer()
const Engine * engine() const
Engine * engine()

Protected Functions inherited from KDGpuExample::XrCompositorLayer

Name
XrCompositorLayer(Type type)
std::shared_ptr< spdlog::logger > logger() const
void uploadBufferData(const KDGpu::BufferUploadOptions & options)
void uploadTextureData(const KDGpu::TextureUploadOptions & options)

Protected Attributes inherited from KDGpuExample::XrCompositorLayer

Name
Type m_type
XrExampleEngineLayer * m_engineLayer
KDGpu::Handle< KDXr::ReferenceSpace_t > m_referenceSpace

Friends inherited from KDGpuExample::XrCompositorLayer

Name
class XrExampleEngineLayer

Public Functions Documentation

function XrQuadLayer

1
2
3
explicit XrQuadLayer(
    const XrQuadLayerOptions & options
)

function ~XrQuadLayer

1
~XrQuadLayer() override

function XrQuadLayer

1
2
3
XrQuadLayer(
    const XrQuadLayer & 
) =delete

function operator=

1
2
3
XrQuadLayer & operator=(
    const XrQuadLayer & 
) =delete

function XrQuadLayer

1
2
3
XrQuadLayer(
    XrQuadLayer && 
) =default

function operator=

1
2
3
XrQuadLayer & operator=(
    XrQuadLayer && 
) =default

Protected Functions Documentation

function initialize

1
virtual void initialize() override

Reimplements: KDGpuExample::XrCompositorLayer::initialize

function cleanup

1
virtual void cleanup() override

Reimplements: KDGpuExample::XrCompositorLayer::cleanup

function update

1
2
3
virtual bool update(
    const KDXr::FrameState & frameState
) override

Reimplements: KDGpuExample::XrCompositorLayer::update

function recreateSwapchains

1
void recreateSwapchains()

function renderQuad

1
virtual void renderQuad() =0

Reimplemented by: KDGpuExample::XrQuadImGuiLayer::renderQuad

function compositionLayer

1
inline virtual KDXr::CompositionLayer * compositionLayer() override

Reimplements: KDGpuExample::XrCompositorLayer::compositionLayer

Public Attributes Documentation

variable position

1
KDBindings::Property< KDXr::Vector3 > position {};

variable orientation

1
KDBindings::Property< KDXr::Quaternion > orientation {};

variable resolution

1
KDBindings::Property< KDGpu::Extent2D > resolution { KDGpu::Extent2D{ 1280, 720 } };

variable worldSize

1
KDBindings::Property< KDGpu::Extent2Df > worldSize { KDGpu::Extent2Df{ 2.0f, 2.0f * resolution().height / resolution().width } };

variable eyeVisibility

1
KDBindings::Property< KDXr::EyeVisibility > eyeVisibility { KDXr::EyeVisibility::Both };

Protected Attributes Documentation

variable m_device

1
KDGpu::Device * m_device { nullptr };

variable m_queue

1
KDGpu::Queue * m_queue { nullptr };

variable m_session

1
KDXr::Session * m_session { nullptr };

variable m_colorSwapchainFormat

1
KDGpu::Format m_colorSwapchainFormat { KDGpu::Format::UNDEFINED };

variable m_depthSwapchainFormat

1
KDGpu::Format m_depthSwapchainFormat { KDGpu::Format::UNDEFINED };

variable m_samples

1
KDGpu::SampleCountFlagBits m_samples { KDGpu::SampleCountFlagBits::Samples1Bit };

variable m_colorSwapchain

1
KDXr::SwapchainInfo m_colorSwapchain;

variable m_depthSwapchain

1
KDXr::SwapchainInfo m_depthSwapchain;

variable m_currentColorImageIndex

1
uint32_t m_currentColorImageIndex { 0 };

variable m_currentDepthImageIndex

1
uint32_t m_currentDepthImageIndex { 0 };

variable m_quadLayer

1
KDXr::QuadLayer m_quadLayer;

Updated on 2024-12-22 at 00:01:23 +0000