Monado OpenXR Runtime
Loading...
Searching...
No Matches
xrt::state_trackers::openvr::SwapchainCache Struct Reference

Since eye textures are created by the clients, and not the runtime, we have to do a copy into a runtime-owned swapchain, this structure cached created swapchains to avoid creating a new one every frame. More...

#include <openvr/compositor/openvr_compositor.hpp>

Collaboration diagram for xrt::state_trackers::openvr::SwapchainCache:

Public Member Functions

xrt_result_t EnsureSwapchain (xrt_compositor *xc, uint32_t format, uint32_t width, uint32_t height, uint32_t sample_count)
 Ensures that there is a swapchain in the cache with the given properties, creating one if necessary.
 

Data Fields

xrt_swapchainxsc {nullptr}
 
uint32_t width {0}
 
uint32_t height {0}
 
uint32_t format {0}
 
uint32_t sample_count {0}
 

Detailed Description

Since eye textures are created by the clients, and not the runtime, we have to do a copy into a runtime-owned swapchain, this structure cached created swapchains to avoid creating a new one every frame.

Member Function Documentation

◆ EnsureSwapchain()

xrt_result_t xrt::state_trackers::openvr::SwapchainCache::EnsureSwapchain ( xrt_compositor xc,
uint32_t  format,
uint32_t  width,
uint32_t  height,
uint32_t  sample_count 
)

Ensures that there is a swapchain in the cache with the given properties, creating one if necessary.

References XRT_SUCCESS.


The documentation for this struct was generated from the following files: