174 bool renderdoc_enabled;
xrt_result_t(* client_gl_insert_fence_func_t)(struct xrt_compositor *xc, xrt_graphics_sync_handle_t *out_handle)
The type of a fence insertion function.
Definition: comp_gl_client.h:130
xrt_result_t(* client_gl_context_begin_locked_func_t)(struct xrt_compositor *xc, enum client_gl_context_reason reason)
Fetches the OpenGL context that is current on this thread and makes the OpenGL context given in the g...
Definition: comp_gl_client.h:91
client_gl_context_reason
What's the reason to make the context current, this is needed currently for EGL where we have to crea...
Definition: comp_gl_client.h:62
@ CLIENT_GL_CONTEXT_REASON_SYNCHRONIZE
Used when the compositor needs to insert a fence in the command stream of the apps context,...
Definition: comp_gl_client.h:68
@ CLIENT_GL_CONTEXT_REASON_OTHER
Any other reason to make the context current, the shared may be used by now.
Definition: comp_gl_client.h:73
void(* client_gl_context_end_locked_func_t)(struct xrt_compositor *xc, enum client_gl_context_reason reason)
Makes the OpenGL context current that was current before client_gl_context_begin_locked_func_t was ca...
Definition: comp_gl_client.h:103
struct xrt_swapchain *(* client_gl_swapchain_create_func_t)(struct xrt_compositor *xc, const struct xrt_swapchain_create_info *info, struct xrt_swapchain_native *xscn, struct client_gl_swapchain **out_sc)
The type of a swapchain create constructor.
Definition: comp_gl_client.h:118
static void os_mutex_lock(struct os_mutex *om)
Lock.
Definition: os_threading.h:86
static void os_mutex_unlock(struct os_mutex *om)
Unlock.
Definition: os_threading.h:110
enum xrt_result xrt_result_t
Result type used across Monado.
@ XRT_SUCCESS
The operation succeeded.
Definition: xrt_results.h:26
Wrapper around OS threading native functions.
Wraps the real compositor providing a OpenGL based interface.
Definition: comp_gl_client.h:142
struct os_mutex context_mutex
client_gl_xlib_compositor::app_context can only be current on one thread; block other threads while w...
Definition: comp_gl_client.h:172
static void client_gl_compositor_context_end(struct xrt_compositor *xc, enum client_gl_context_reason reason)
Makes the OpenGL context current that was current before client_gl_context_begin_locked_func_t was ca...
Definition: comp_gl_client.h:256
static xrt_result_t client_gl_compositor_context_begin(struct xrt_compositor *xc, enum client_gl_context_reason reason)
Fetches the OpenGL context that is current on this thread and makes the OpenGL context given in the g...
Definition: comp_gl_client.h:234
client_gl_swapchain_create_func_t create_swapchain
Function pointer for creating the client swapchain.
Definition: comp_gl_client.h:160
bool client_gl_compositor_init(struct client_gl_compositor *c, struct xrt_compositor_native *xcn, client_gl_context_begin_locked_func_t context_begin, client_gl_context_end_locked_func_t context_end, client_gl_swapchain_create_func_t create_swapchain, client_gl_insert_fence_func_t insert_fence)
Fill in a client_gl_compositor and do common OpenGL readiness checking.
Definition: comp_gl_client.c:587
static struct client_gl_compositor * client_gl_compositor(struct xrt_compositor *xc)
Down-cast helper.
Definition: comp_gl_client.h:189
client_gl_insert_fence_func_t insert_fence
Function pointer for inserting fences on xrt_compositor::layer_commit.
Definition: comp_gl_client.h:166
void client_gl_compositor_close(struct client_gl_compositor *c)
Free all resources from the client_gl_compositor, does not free the client_gl_compositor itself.
Definition: comp_gl_client.c:581
client_gl_context_end_locked_func_t context_end_locked
Function pointer for restoring prior OpenGL context.
Definition: comp_gl_client.h:155
client_gl_context_begin_locked_func_t context_begin_locked
Function pointer for making the OpenGL context current.
Definition: comp_gl_client.h:150
Wraps the real compositor swapchain providing a OpenGL based interface.
Definition: comp_gl_client.h:38
uint32_t tex_target
The texture target of images in this swapchain.
Definition: comp_gl_client.h:45
struct client_gl_compositor * gl_compositor
The compositor this swapchain was created on.
Definition: comp_gl_client.h:52
struct xrt_swapchain_gl base
Implements xrt_swapchain_gl.
Definition: comp_gl_client.h:40
A wrapper around a native mutex.
Definition: os_threading.h:55
Base class for an OpenGL (ES) client compositor.
Definition: xrt_compositor.h:1960
Main compositor server interface.
Definition: xrt_compositor.h:2224
Common compositor client interface/base.
Definition: xrt_compositor.h:988
Swapchain creation info.
Definition: xrt_compositor.h:876
Base class for an OpenGL (ES) client swapchain.
Definition: xrt_compositor.h:1945
Base class for a swapchain that exposes a native buffer handle to be imported into a client API.
Definition: xrt_compositor.h:2191
Common swapchain interface/base.
Definition: xrt_compositor.h:536
Header declaring XRT graphics interfaces.
int xrt_graphics_sync_handle_t
The type underlying synchronization primitives (semaphores, etc) shared between compositor clients an...
Definition: xrt_handles.h:348