Monado OpenXR Runtime
OpenGL bindings

OpenGL bindings helper library. More...

Collaboration diagram for OpenGL bindings:

Files

file  egl_api.c
 EGL API wrapper.
 
file  egl_api.h
 EGL API wrapper header.
 
file  glx_api.c
 GLX API wrapper.
 
file  glx_api.h
 GLX API wrapper header.
 
file  ogl_api.c
 OpenGL API wrapper.
 
file  ogl_api.h
 OpenGL API wrapper header.
 
file  ogl_documentation.h
 Header with only documentation.
 
file  ogl_helpers.c
 Common OpenGL code.
 
file  ogl_helpers.h
 Common OpenGL code header.
 
file  wgl_api.c
 WGL API wrapper.
 
file  wgl_api.h
 WGL API wrapper header.
 

Data Structures

struct  ogl_import_results
 Results from a import, nicer then having to pass in multiple arrays. More...
 

Functions

void ogl_texture_target_for_swapchain_info (const struct xrt_swapchain_create_info *info, uint32_t *out_tex_target, uint32_t *out_tex_param_name)
 Determine the texture target and the texture binding parameter to save/restore for creation/use of an OpenGL texture from the given info. More...
 
XRT_CHECK_RESULT uint32_t ogl_vk_format_to_gl (int64_t vk_format)
 Converts a Vulkan format to corresponding OpenGL format, will return 0 if no mapping exist for the given format. More...
 
XRT_CHECK_RESULT bool ogl_import_from_native (struct xrt_image_native *natives, uint32_t native_count, const struct xrt_swapchain_create_info *info, struct ogl_import_results *results)
 Import native images, a context needs to be current when called. More...
 

Detailed Description

OpenGL bindings helper library.

Function Documentation

◆ ogl_import_from_native()

XRT_CHECK_RESULT bool ogl_import_from_native ( struct xrt_image_native natives,
uint32_t  native_count,
const struct xrt_swapchain_create_info info,
struct ogl_import_results results 
)

◆ ogl_texture_target_for_swapchain_info()

void ogl_texture_target_for_swapchain_info ( const struct xrt_swapchain_create_info info,
uint32_t *  out_tex_target,
uint32_t *  out_tex_param_name 
)

#include <auxiliary/ogl/ogl_helpers.h>

Determine the texture target and the texture binding parameter to save/restore for creation/use of an OpenGL texture from the given info.

Todo:
test GL_TEXTURE_EXTERNAL_OES on Android

Referenced by client_gl_memobj_swapchain_create(), and ogl_import_from_native().

◆ ogl_vk_format_to_gl()

XRT_CHECK_RESULT uint32_t ogl_vk_format_to_gl ( int64_t  vk_format)

#include <auxiliary/ogl/ogl_helpers.h>

Converts a Vulkan format to corresponding OpenGL format, will return 0 if no mapping exist for the given format.

References U_LOG_W.

Referenced by ogl_import_from_native().