|
Monado OpenXR Runtime
|
OpenGL client side glue to compositor implementation. More...
#include <stdio.h>#include <string.h>#include <assert.h>#include <stdlib.h>#include <xrt/xrt_config_have.h>#include <xrt/xrt_handles.h>#include "util/u_misc.h"#include "ogl/ogl_api.h"#include "ogl/ogl_helpers.h"#include "client/comp_gl_client.h"#include "client/comp_gl_memobj_swapchain.h"
Functions | |
| static void | client_gl_memobj_swapchain_destroy (struct xrt_swapchain *xsc) |
| static XRT_MAYBE_UNUSED bool | client_gl_memobj_swapchain_import (GLuint memory, size_t size, xrt_graphics_buffer_handle_t handle) |
| struct xrt_swapchain * | client_gl_memobj_swapchain_create (struct xrt_compositor *xc, const struct xrt_swapchain_create_info *info, struct xrt_swapchain_native *xscn, struct client_gl_swapchain **out_cglsc) |
| Create a swapchain, belonging to a client_gl_compositor, that uses GL_memory_object and related extensions to use the native buffer. | |
OpenGL client side glue to compositor implementation.
| struct xrt_swapchain * client_gl_memobj_swapchain_create | ( | struct xrt_compositor * | xc, |
| const struct xrt_swapchain_create_info * | info, | ||
| struct xrt_swapchain_native * | xscn, | ||
| struct client_gl_swapchain ** | out_cglsc | ||
| ) |
Create a swapchain, belonging to a client_gl_compositor, that uses GL_memory_object and related extensions to use the native buffer.
This is most commonly used on desktop OpenGL.
The caller must ensure that the app context is current.
References client_gl_swapchain::base, xrt_swapchain_gl::base, xrt_swapchain_native::base, xrt_swapchain::destroy, client_gl_swapchain::gl_compositor, xrt_image_native::handle, xrt_swapchain::image_count, xrt_compositor::info, ogl_texture_target_for_swapchain_info(), xrt_swapchain::reference, xrt_image_native::size, client_gl_swapchain::tex_target, U_TYPED_CALLOC, xrt_image_native::use_dedicated_allocation, and XRT_GRAPHICS_BUFFER_HANDLE_INVALID.
Referenced by client_gl_win32_compositor::client_gl_win32_compositor_create(), and client_gl_xlib_compositor::client_gl_xlib_compositor_create().