|
MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
|
Go to the source code of this file.
Data Structures | |
| struct | mln_metal_surface_descriptor |
| struct | mln_vulkan_surface_descriptor |
| struct | mln_opengl_surface_descriptor |
Functions | |
| mln_metal_surface_descriptor | mln_metal_surface_descriptor_default (void) |
| mln_vulkan_surface_descriptor | mln_vulkan_surface_descriptor_default (void) |
| mln_opengl_surface_descriptor | mln_opengl_surface_descriptor_default (void) |
| mln_status | mln_metal_surface_attach (mln_map *map, const mln_metal_surface_descriptor *descriptor, mln_render_session **out_session) |
| mln_status | mln_vulkan_surface_attach (mln_map *map, const mln_vulkan_surface_descriptor *descriptor, mln_render_session **out_session) |
| mln_status | mln_opengl_surface_attach (mln_map *map, const mln_opengl_surface_descriptor *descriptor, mln_render_session **out_session) |
Public C API declarations for surface render targets.
| mln_status mln_metal_surface_attach | ( | mln_map * | map, |
| const mln_metal_surface_descriptor * | descriptor, | ||
| mln_render_session ** | out_session ) |
Attaches a Metal native surface render target to a map.
The map may have at most one live render session. The session and every surface-session call are owner-thread affine to the map owner thread. The session retains descriptor->layer and optional descriptor->context.device. It renders into the layer and presents through it. On success, *out_session receives a handle the caller destroys with mln_render_session_destroy().
Returns:
| mln_metal_surface_descriptor mln_metal_surface_descriptor_default | ( | void | ) |
Returns Metal surface descriptor defaults for this C API version.
| mln_status mln_opengl_surface_attach | ( | mln_map * | map, |
| const mln_opengl_surface_descriptor * | descriptor, | ||
| mln_render_session ** | out_session ) |
Attaches an OpenGL native surface render target to a map.
The map may have at most one live render session. The session and every surface-session call are owner-thread affine to the map owner thread. The session renders to descriptor->surface and presents through the selected context provider. WGL surfaces present with SwapBuffers(HDC), and EGL surfaces present with eglSwapBuffers(EGLDisplay, EGLSurface). OpenGL context handles are borrowed and must remain valid until detach or destroy. On success, *out_session receives a handle the caller destroys with mln_render_session_destroy().
Returns:
| mln_opengl_surface_descriptor mln_opengl_surface_descriptor_default | ( | void | ) |
Returns OpenGL surface descriptor defaults for this C API version.
| mln_status mln_vulkan_surface_attach | ( | mln_map * | map, |
| const mln_vulkan_surface_descriptor * | descriptor, | ||
| mln_render_session ** | out_session ) |
Attaches a Vulkan native surface render target to a map.
The map may have at most one live render session. The session and every surface-session call are owner-thread affine to the map owner thread. The session renders to descriptor->surface and presents through it. The Vulkan device must support VK_KHR_swapchain, and the queue family must support graphics and presentation to descriptor->surface. Vulkan handles are borrowed and must remain valid until the session is detached or destroyed. On success, *out_session receives a handle the caller destroys with mln_render_session_destroy().
Returns:
| mln_vulkan_surface_descriptor mln_vulkan_surface_descriptor_default | ( | void | ) |
Returns Vulkan surface descriptor defaults for this C API version.