Monado OpenXR Runtime
client_gl_swapchain Class Reference

Wraps the real compositor swapchain providing a OpenGL based interface. More...

#include <client/comp_gl_client.h>

Inheritance diagram for client_gl_swapchain:
Collaboration diagram for client_gl_swapchain:

Data Fields

struct xrt_swapchain_gl base
 Implements xrt_swapchain_gl. More...
 
struct xrt_swapchain_nativexscn
 
uint32_t tex_target
 The texture target of images in this swapchain. More...
 
struct client_gl_compositorgl_compositor
 The compositor this swapchain was created on. More...
 
- Data Fields inherited from xrt_swapchain_gl
struct xrt_swapchain base
 Base. More...
 
unsigned int images [XRT_MAX_SWAPCHAIN_IMAGES]
 
- Data Fields inherited from xrt_swapchain
struct xrt_reference reference
 Reference helper. More...
 
uint32_t image_count
 Number of images. More...
 
void(* destroy )(struct xrt_swapchain *xsc)
 dec_image_use must have been called as often as inc_image_use. More...
 
xrt_result_t(* acquire_image )(struct xrt_swapchain *xsc, uint32_t *out_index)
 Obtain the index of the next image to use, without blocking on being able to write to it. More...
 
xrt_result_t(* inc_image_use )(struct xrt_swapchain *xsc, uint32_t index)
 Increments the use counter of a swapchain image. More...
 
xrt_result_t(* dec_image_use )(struct xrt_swapchain *xsc, uint32_t index)
 Decrements the use counter of a swapchain image. More...
 
xrt_result_t(* wait_image )(struct xrt_swapchain *xsc, uint64_t timeout_ns, uint32_t index)
 Wait until image index is available for exclusive use, or until timeout_ns expires. More...
 
xrt_result_t(* barrier_image )(struct xrt_swapchain *xsc, enum xrt_barrier_direction direction, uint32_t index)
 Do any barrier transitions to and from the application. More...
 
xrt_result_t(* release_image )(struct xrt_swapchain *xsc, uint32_t index)
 See xrReleaseSwapchainImage, state tracker needs to track index. More...
 

Additional Inherited Members

- Public Member Functions inherited from xrt_swapchain
static xrt_result_t xrt_swapchain_acquire_image (struct xrt_swapchain *xsc, uint32_t *out_index)
 Obtain the index of the next image to use, without blocking on being able to write to it. More...
 
static xrt_result_t xrt_swapchain_inc_image_use (struct xrt_swapchain *xsc, uint32_t index)
 Increments the use counter of a swapchain image. More...
 
static xrt_result_t xrt_swapchain_dec_image_use (struct xrt_swapchain *xsc, uint32_t index)
 Decrements the use counter of a swapchain image. More...
 
static xrt_result_t xrt_swapchain_wait_image (struct xrt_swapchain *xsc, uint64_t timeout_ns, uint32_t index)
 Wait until image index is available for exclusive use, or until timeout_ns expires. More...
 
static xrt_result_t xrt_swapchain_barrier_image (struct xrt_swapchain *xsc, enum xrt_barrier_direction direction, uint32_t index)
 Do any barrier transitions to and from the application. More...
 
static xrt_result_t xrt_swapchain_release_image (struct xrt_swapchain *xsc, uint32_t index)
 See xrReleaseSwapchainImage, state tracker needs to track index. More...
 

Detailed Description

Wraps the real compositor swapchain providing a OpenGL based interface.

Almost a one to one mapping to a OpenXR swapchain.

Field Documentation

◆ base

struct xrt_swapchain_gl client_gl_swapchain::base

◆ gl_compositor

struct client_gl_compositor* client_gl_swapchain::gl_compositor

The compositor this swapchain was created on.

Used when swapchain functions need to use the GL context.

Not an owning pointer.

◆ tex_target

uint32_t client_gl_swapchain::tex_target

The texture target of images in this swapchain.


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