Skip to content

KDGpuExample::XrQuadImGuiLayer

#include <xr_quad_imgui_layer.h>

Inherits from KDGpuExample::XrQuadLayer, KDGpuExample::XrCompositorLayer

Public Functions

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

Protected Functions

Name
virtual void initialize() override
virtual void cleanup() override
virtual void renderQuad() 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::XrQuadLayer

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

Protected Functions inherited from KDGpuExample::XrQuadLayer

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

Public Attributes inherited from KDGpuExample::XrQuadLayer

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 inherited from KDGpuExample::XrQuadLayer

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

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 XrQuadImGuiLayer

1
2
3
explicit XrQuadImGuiLayer(
    const XrQuadLayerOptions & options
)

function ~XrQuadImGuiLayer

1
~XrQuadImGuiLayer() override

function XrQuadImGuiLayer

1
2
3
XrQuadImGuiLayer(
    const XrQuadImGuiLayer & 
) =delete

function operator=

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

function XrQuadImGuiLayer

1
2
3
XrQuadImGuiLayer(
    XrQuadImGuiLayer && 
) =default

function operator=

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

1
virtual void renderQuad() override

Reimplements: KDGpuExample::XrQuadLayer::renderQuad

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-09-08 at 00:13:07 +0000