|
MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
|
Go to the source code of this file.
Data Structures | |
| struct | mln_queue_lock |
| struct | mln_render_session_attach_options |
| struct | mln_render_session_capabilities |
| struct | mln_gpu_sync |
| struct | mln_metal_context_descriptor |
| struct | mln_vulkan_context_descriptor |
| struct | mln_web_gpu_context_descriptor |
| struct | mln_wgl_context_descriptor |
| struct | mln_egl_context_descriptor |
| struct | mln_web_gl_context_descriptor |
| union | mln_open_gl_context_descriptor_data |
| struct | mln_open_gl_context_descriptor |
Macros | |
| #define | MLN_VULKAN_NON_DISPATCHABLE_HANDLE_NULL UINT64_C(0) |
| #define | MLN_TEXTURE_RING_MAX_DEPTH 8u |
Functions | |
| mln_status | mln_logical_extent_physical_size (mln_logical_extent extent, uint32_t *out_width, uint32_t *out_height, mln_diagnostic *out_diagnostic) |
| mln_open_gl_context_provider_flags | mln_open_gl_supported_context_provider_mask (void) |
Options, capabilities, graphics contexts, and GPU synchronization that every render target shares.
| #define MLN_TEXTURE_RING_MAX_DEPTH 8u |
The most textures that a render session's texture ring can have.
| #define MLN_VULKAN_NON_DISPATCHABLE_HANDLE_NULL UINT64_C(0) |
The null Vulkan non-dispatchable handle.
| typedef struct mln_egl_context_descriptor mln_egl_context_descriptor |
The EGL objects that a render session makes its OpenGL context from.
| typedef struct mln_gpu_sync mln_gpu_sync |
A point in GPU work that the other side waits for before using a texture.
| typedef enum mln_gpu_sync_kind mln_gpu_sync_kind |
How one side waits for the other's GPU work on a shared texture.
A sync file descriptor or an OpenGL fence signals once, so when mln_acquired_frame_release() succeeds, the session takes the one you pass. A Vulkan timeline semaphore, Metal shared event, or D3D12 fence counts up with each frame, so the one you pass stays yours. Keep it valid until a detach or release of the session completes.
| typedef enum mln_gpu_sync_kind_flag mln_gpu_sync_kind_flag |
A GPU sync kind, as a bit in a set.
| typedef uint32_t mln_gpu_sync_kind_flags |
A set of mln_gpu_sync_kind_flag bits.
| typedef struct mln_metal_context_descriptor mln_metal_context_descriptor |
The Metal device that a render session uses.
| typedef enum mln_open_gl_client_api mln_open_gl_client_api |
The OpenGL API that a context renders with.
| typedef struct mln_open_gl_context_descriptor mln_open_gl_context_descriptor |
How a render session gets the OpenGL context that it renders with.
Keep the objects that it names alive until a detach or release of the session completes, or an abandon of it returns.
| typedef union mln_open_gl_context_descriptor_data mln_open_gl_context_descriptor_data |
The WGL, EGL, or WebGL part of an OpenGL context descriptor.
Whether a render session's OpenGL context shares objects with yours.
| typedef enum mln_open_gl_context_platform mln_open_gl_context_platform |
The platform API that provides an OpenGL context.
An OpenGL context platform, as a bit in a set.
| typedef uint32_t mln_open_gl_context_provider_flags |
A set of mln_open_gl_context_provider_flag bits.
| typedef struct mln_queue_lock mln_queue_lock |
Your lock on a Vulkan queue that you and a render session both submit to.
The session holds the lock only while it submits or presents to the queue. Set both lock and unlock, or neither when you don't submit to the queue yourself.
| typedef void(*) mln_queue_lock_callback(void *user_data) |
Locks or unlocks the Vulkan queue that you share with a render session.
Threads: It can run on a library thread, and it can't call the library.
| typedef enum mln_render_driver_kind mln_render_driver_kind |
The thread that runs a render session's graphics work.
| typedef struct mln_render_session_attach_options mln_render_session_attach_options |
Options for attaching a render session to a map.
| typedef struct mln_render_session_capabilities mln_render_session_capabilities |
What an attached render session supports.
Something that a render session can do.
| typedef uint32_t mln_render_session_capability_flags |
A set of mln_render_session_capability_flag bits.
| typedef struct mln_vulkan_context_descriptor mln_vulkan_context_descriptor |
The Vulkan device and queue that a render session uses.
Keep these objects alive until a detach or release of the session completes, or an abandon of it returns.
| typedef uint64_t mln_vulkan_non_dispatchable_handle |
A Vulkan non-dispatchable handle, such as a VkImage, as an integer.
| typedef struct mln_web_gl_context_descriptor mln_web_gl_context_descriptor |
The WebGL context or canvas that a render session uses.
| typedef enum mln_web_gl_context_kind mln_web_gl_context_kind |
How a render session gets its WebGL context.
| typedef struct mln_web_gpu_context_descriptor mln_web_gpu_context_descriptor |
The WebGPU device that a render session uses.
| typedef struct mln_wgl_context_descriptor mln_wgl_context_descriptor |
The WGL objects that a render session makes its OpenGL context from.
| enum mln_gpu_sync_kind : uint32_t |
How one side waits for the other's GPU work on a shared texture.
A sync file descriptor or an OpenGL fence signals once, so when mln_acquired_frame_release() succeeds, the session takes the one you pass. A Vulkan timeline semaphore, Metal shared event, or D3D12 fence counts up with each frame, so the one you pass stays yours. Keep it valid until a detach or release of the session completes.
| enum mln_gpu_sync_kind_flag : uint32_t |
A GPU sync kind, as a bit in a set.
| enum mln_open_gl_client_api : uint32_t |
| enum mln_open_gl_context_ownership : uint32_t |
| enum mln_open_gl_context_platform : uint32_t |
| enum mln_open_gl_context_provider_flag : uint32_t |
| enum mln_render_driver_kind : uint32_t |
The thread that runs a render session's graphics work.
| Enumerator | |
|---|---|
| MLN_RENDER_DRIVER_CORE_WORKER | A library thread. |
| MLN_RENDER_DRIVER_CALLER_GRAPHICS_THREAD | Your thread, when it calls mln_render_session_service_driver_work(). |
| enum mln_render_session_capability_flag : uint32_t |
Something that a render session can do.
| Enumerator | |
|---|---|
| MLN_RENDER_SESSION_CAPABILITY_FRAME_ACQUISITION | mln_render_session_acquire_frame() can take the frames it renders. |
| MLN_RENDER_SESSION_CAPABILITY_READBACK | mln_render_session_read_texture() can copy its texture to memory. |
| MLN_RENDER_SESSION_CAPABILITY_PRESENTATION | It shows frames on a surface. |
| enum mln_web_gl_context_kind : uint32_t |
How a render session gets its WebGL context.
| mln_status mln_logical_extent_physical_size | ( | mln_logical_extent | extent, |
| uint32_t * | out_width, | ||
| uint32_t * | out_height, | ||
| mln_diagnostic * | out_diagnostic ) |
Computes the size in pixels of a target with a logical size and scale factor.
| mln_open_gl_context_provider_flags mln_open_gl_supported_context_provider_mask | ( | void | ) |
Reports the OpenGL context platforms that this build of the library has.