mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-29 18:08:29 +00:00
a/ogl: Add Win32 handle import
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2302>
This commit is contained in:
parent
0c1f488d8a
commit
a1ca69e0f5
|
@ -123,11 +123,19 @@ ogl_import_from_native(struct xrt_image_native *natives,
|
|||
// The below function consumes the handle, need to reference it.
|
||||
xrt_graphics_buffer_handle_t handle = u_graphics_buffer_ref(natives[i].handle);
|
||||
|
||||
#if defined(XRT_GRAPHICS_BUFFER_HANDLE_IS_WIN32_HANDLE)
|
||||
glImportMemoryWin32HandleEXT( //
|
||||
results->memories[i], //
|
||||
natives[i].size, //
|
||||
GL_HANDLE_TYPE_OPAQUE_WIN32_EXT, //
|
||||
(GLint)handle); //
|
||||
#else
|
||||
glImportMemoryFdEXT( //
|
||||
results->memories[i], //
|
||||
natives[i].size, //
|
||||
GL_HANDLE_TYPE_OPAQUE_FD_EXT, //
|
||||
(GLint)handle); //
|
||||
#endif
|
||||
CHECK_GL();
|
||||
|
||||
if (info->array_size == 1) {
|
||||
|
|
Loading…
Reference in a new issue