Skip to content

KDGpuExample::XrCylinderImGuiLayer

#include <xr_cylinder_imgui_layer.h>

Inherits from KDGpuExample::XrCylinderLayer, KDGpuExample::XrCompositorLayer

Public Functions

Name
XrCylinderImGuiLayer(const XrCylinderLayerOptions & options)
~XrCylinderImGuiLayer() override
XrCylinderImGuiLayer(const XrCylinderImGuiLayer & ) =delete
XrCylinderImGuiLayer & operator=(const XrCylinderImGuiLayer & ) =delete
XrCylinderImGuiLayer(XrCylinderImGuiLayer && ) =default
XrCylinderImGuiLayer & operator=(XrCylinderImGuiLayer && ) =default
void registerImGuiOverlayDrawFunction(const std::function< void(ImGuiContext *)> & func)
void clearImGuiOverlayDrawFunctions()

Protected Functions

Name
virtual void initialize() override
virtual void cleanup() override
virtual void renderCylinder() override
virtual void drawImGuiOverlay(ImGuiContext * ctx)
virtual void renderImGuiOverlay(KDGpu::RenderPassCommandRecorder * recorder, uint32_t inFlightIndex =0)
void recreateImGuiOverlay()
void updateImGuiOverlay()

Protected Attributes

Name
std::unique_ptr< ImGuiItem > m_imguiOverlay
std::vector< std::function< void(ImGuiContext *)> > m_imGuiOverlayDrawFunctions
KDGpu::RenderPassCommandRecorderOptions m_imguiPassOptions
KDGpu::Fence m_fence
KDGpu::CommandBuffer m_commandBuffer

Additional inherited members

Public Functions inherited from KDGpuExample::XrCylinderLayer

Name
XrCylinderLayer(const XrCylinderLayerOptions & options)
~XrCylinderLayer() override
XrCylinderLayer(const XrCylinderLayer & ) =delete
XrCylinderLayer(XrCylinderLayer && ) =default

Protected Functions inherited from KDGpuExample::XrCylinderLayer

Name
virtual bool update(const KDXr::FrameState & frameState) override
void recreateSwapchains()
virtual KDXr::CompositionLayer * compositionLayer() override

Public Attributes inherited from KDGpuExample::XrCylinderLayer

Name
KDBindings::Property< KDXr::Vector3 > position
KDBindings::Property< KDXr::Quaternion > orientation
KDBindings::Property< KDGpu::Extent2D > resolution
KDBindings::Property< float > radius
KDBindings::Property< float > centralAngle
KDBindings::Property< float > aspectRatio
KDBindings::Property< KDXr::EyeVisibility > eyeVisibility

Protected Attributes inherited from KDGpuExample::XrCylinderLayer

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::CylinderLayer m_cylinderLayer

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)
virtual bool update(const KDXr::FrameState & frameState) =0
virtual KDXr::CompositionLayer * compositionLayer() =0
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 XrCylinderImGuiLayer

1
2
3
explicit XrCylinderImGuiLayer(
    const XrCylinderLayerOptions & options
)

function ~XrCylinderImGuiLayer

1
~XrCylinderImGuiLayer() override

function XrCylinderImGuiLayer

1
2
3
XrCylinderImGuiLayer(
    const XrCylinderImGuiLayer & 
) =delete

function operator=

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

function XrCylinderImGuiLayer

1
2
3
XrCylinderImGuiLayer(
    XrCylinderImGuiLayer && 
) =default

function operator=

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

function registerImGuiOverlayDrawFunction

1
2
3
void registerImGuiOverlayDrawFunction(
    const std::function< void(ImGuiContext *)> & func
)

function clearImGuiOverlayDrawFunctions

1
void clearImGuiOverlayDrawFunctions()

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 renderCylinder

1
virtual void renderCylinder() override

Reimplements: KDGpuExample::XrCylinderLayer::renderCylinder

function drawImGuiOverlay

1
2
3
virtual void drawImGuiOverlay(
    ImGuiContext * ctx
)

function renderImGuiOverlay

1
2
3
4
virtual void renderImGuiOverlay(
    KDGpu::RenderPassCommandRecorder * recorder,
    uint32_t inFlightIndex =0
)

function recreateImGuiOverlay

1
void recreateImGuiOverlay()

function updateImGuiOverlay

1
void updateImGuiOverlay()

Protected Attributes Documentation

variable m_imguiOverlay

1
std::unique_ptr< ImGuiItem > m_imguiOverlay;

variable m_imGuiOverlayDrawFunctions

1
std::vector< std::function< void(ImGuiContext *)> > m_imGuiOverlayDrawFunctions;

variable m_imguiPassOptions

1
KDGpu::RenderPassCommandRecorderOptions m_imguiPassOptions;

variable m_fence

1
KDGpu::Fence m_fence;

variable m_commandBuffer

1
KDGpu::CommandBuffer m_commandBuffer;

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