|
Monado OpenXR Runtime
|
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>
Public Member Functions | |
| xrt_result_t | EnsureSwapchain (xrt_compositor *xc, uint32_t storage_format, uint32_t sample_format, uint32_t width, uint32_t height, xrt_swapchain_usage_bits usage_bits, xrt_swapchain_create_flags flags) |
| Ensures that there is a swapchain in the cache with the given properties, creating one if necessary. | |
| void | Reset () |
| Resets the internal state of the cache, releasing any swapchain it holds. | |
Data Fields | |
| xrt_swapchain * | xsc {nullptr} |
| uint32_t | width {0} |
| uint32_t | height {0} |
| uint32_t | storage_format {0} |
| uint32_t | sample_format {0} |
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.
| xrt_result_t xrt::state_trackers::openvr::SwapchainCache::EnsureSwapchain | ( | xrt_compositor * | xc, |
| uint32_t | storage_format, | ||
| uint32_t | sample_format, | ||
| uint32_t | width, | ||
| uint32_t | height, | ||
| xrt_swapchain_usage_bits | usage_bits, | ||
| xrt_swapchain_create_flags | flags | ||
| ) |
Ensures that there is a swapchain in the cache with the given properties, creating one if necessary.
References XRT_ERROR_INVALID_ARGUMENT, XRT_SUCCESS, and XRT_SWAPCHAIN_CREATE_SAMPLE_AS_SRGB.
| void xrt::state_trackers::openvr::SwapchainCache::Reset | ( | ) |
Resets the internal state of the cache, releasing any swapchain it holds.