Skip to content

KDGpuExample::XrProjectionLayer

#include <xr_projection_layer.h>

Inherits from KDGpuExample::XrCompositorLayer

Inherited by ProjectionLayer, ProjectionLayer

Public Functions

Name
XrProjectionLayer(const XrProjectionLayerOptions & options)
~XrProjectionLayer() override
XrProjectionLayer(const XrProjectionLayer & ) =delete
XrProjectionLayer & operator=(const XrProjectionLayer & ) =delete
XrProjectionLayer(XrProjectionLayer && ) =default
XrProjectionLayer & operator=(XrProjectionLayer && ) =default

Protected Functions

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

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
bool m_enableMultiview
float m_nearPlane
float m_farPlane
std::vector< KDXr::SwapchainInfo > m_colorSwapchains
std::vector< KDXr::SwapchainInfo > m_depthSwapchains
uint32_t m_viewCount
uint32_t m_currentViewIndex
uint32_t m_currentColorImageIndex
uint32_t m_currentDepthImageIndex
KDXr::ViewState m_viewState
KDXr::ProjectionLayer m_projectionLayer
std::vector< KDXr::ProjectionLayerView > m_projectionLayerViews
std::vector< KDXr::DepthInfo > m_depthInfos

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 XrProjectionLayer

1
2
3
explicit XrProjectionLayer(
    const XrProjectionLayerOptions & options
)

function ~XrProjectionLayer

1
~XrProjectionLayer() override

function XrProjectionLayer

1
2
3
XrProjectionLayer(
    const XrProjectionLayer & 
) =delete

function operator=

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

function XrProjectionLayer

1
2
3
XrProjectionLayer(
    XrProjectionLayer && 
) =default

function operator=

1
2
3
XrProjectionLayer & operator=(
    XrProjectionLayer && 
) =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 compositionLayer

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

Reimplements: KDGpuExample::XrCompositorLayer::compositionLayer

function updateScene

1
virtual void updateScene()

Reimplemented by: ProjectionLayer::updateScene, ProjectionLayer::updateScene

function renderView

1
virtual void renderView() =0

Reimplemented by: ProjectionLayer::renderView, ProjectionLayer::renderView

function recreateSwapchains

1
void recreateSwapchains()

function viewCount

1
inline uint32_t viewCount() const

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_enableMultiview

1
bool m_enableMultiview { true };

variable m_nearPlane

1
float m_nearPlane { 0.05f };

variable m_farPlane

1
float m_farPlane { 100.0f };

variable m_colorSwapchains

1
std::vector< KDXr::SwapchainInfo > m_colorSwapchains;

variable m_depthSwapchains

1
std::vector< KDXr::SwapchainInfo > m_depthSwapchains;

variable m_viewCount

1
uint32_t m_viewCount { 2 };

variable m_currentViewIndex

1
uint32_t m_currentViewIndex { 0 };

variable m_currentColorImageIndex

1
uint32_t m_currentColorImageIndex { 0 };

variable m_currentDepthImageIndex

1
uint32_t m_currentDepthImageIndex { 0 };

variable m_viewState

1
KDXr::ViewState m_viewState;

variable m_projectionLayer

1
KDXr::ProjectionLayer m_projectionLayer;

variable m_projectionLayerViews

1
std::vector< KDXr::ProjectionLayerView > m_projectionLayerViews { 2 };

variable m_depthInfos

1
std::vector< KDXr::DepthInfo > m_depthInfos { 2 };

Updated on 2024-09-08 at 00:13:07 +0000