|
MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
|
Go to the source code of this file.
Data Structures | |
| struct | mln_render_target_extent |
| struct | mln_metal_context_descriptor |
| struct | mln_vulkan_context_descriptor |
| struct | mln_webgpu_context_descriptor |
| struct | mln_wgl_context_descriptor |
| struct | mln_egl_context_descriptor |
| struct | mln_webgl_context_descriptor |
| struct | mln_opengl_context_descriptor |
Typedefs | |
| typedef struct mln_render_target_extent | mln_render_target_extent |
| typedef struct mln_metal_context_descriptor | mln_metal_context_descriptor |
| typedef struct mln_vulkan_context_descriptor | mln_vulkan_context_descriptor |
| typedef struct mln_webgpu_context_descriptor | mln_webgpu_context_descriptor |
| typedef enum mln_opengl_context_provider_flag | mln_opengl_context_provider_flag |
| typedef enum mln_opengl_context_platform | mln_opengl_context_platform |
| typedef enum mln_opengl_context_ownership | mln_opengl_context_ownership |
| typedef enum mln_opengl_client_api | mln_opengl_client_api |
| typedef struct mln_wgl_context_descriptor | mln_wgl_context_descriptor |
| typedef struct mln_egl_context_descriptor | mln_egl_context_descriptor |
| typedef struct mln_webgl_context_descriptor | mln_webgl_context_descriptor |
| typedef struct mln_opengl_context_descriptor | mln_opengl_context_descriptor |
Enumerations | |
| enum | mln_opengl_context_provider_flag : uint32_t { } |
| enum | mln_opengl_context_platform : uint32_t { MLN_OPENGL_CONTEXT_PLATFORM_UNSPECIFIED = 0u , MLN_OPENGL_CONTEXT_PLATFORM_WGL = 1u , MLN_OPENGL_CONTEXT_PLATFORM_EGL = 2u , MLN_OPENGL_CONTEXT_PLATFORM_WEBGL = 3u } |
| enum | mln_opengl_context_ownership : uint32_t { MLN_OPENGL_CONTEXT_OWNERSHIP_SHARED = 0u , MLN_OPENGL_CONTEXT_OWNERSHIP_DEDICATED = 1u } |
| enum | mln_opengl_client_api : uint32_t { MLN_OPENGL_CLIENT_API_UNSPECIFIED = 0u , MLN_OPENGL_CLIENT_API_GL = 1u , MLN_OPENGL_CLIENT_API_GLES = 2u } |
Functions | |
| mln_status | mln_render_target_extent_physical_size (const mln_render_target_extent *extent, uint32_t *out_width, uint32_t *out_height) |
| uint32_t | mln_opengl_supported_context_provider_mask (void) |
Shared public C API declarations for render target descriptors.
| typedef struct mln_egl_context_descriptor mln_egl_context_descriptor |
EGL context fields shared by OpenGL render targets.
| typedef struct mln_metal_context_descriptor mln_metal_context_descriptor |
Metal backend context fields shared by Metal render targets.
| typedef enum mln_opengl_client_api mln_opengl_client_api |
OpenGL client API a dedicated EGL session creates its context for.
| typedef struct mln_opengl_context_descriptor mln_opengl_context_descriptor |
OpenGL backend context fields shared by OpenGL render targets.
| typedef enum mln_opengl_context_ownership mln_opengl_context_ownership |
How a session's OpenGL context relates to the thread that attached it.
A shared session leaves the thread as it found it: every render makes the session context current and restores whatever was current before. The session context joins the host share group named by the descriptor, so a host may hand the session a texture and sample it from its own context.
A dedicated session owns the thread. It makes its context current once and keeps it current between renders, and it joins no share group. Use this when a thread exists to drive one render session and runs no other graphics work, such as an Android host that renders into a SurfaceView.
| typedef enum mln_opengl_context_platform mln_opengl_context_platform |
OpenGL platform context provider used by a context descriptor.
OpenGL context providers supported by this build.
| typedef struct mln_render_target_extent mln_render_target_extent |
Logical render target extent in UI pixels.
| typedef struct mln_vulkan_context_descriptor mln_vulkan_context_descriptor |
Vulkan backend context fields shared by Vulkan render targets.
| typedef struct mln_webgl_context_descriptor mln_webgl_context_descriptor |
WebGL context fields shared by OpenGL render targets in the browser.
| typedef struct mln_webgpu_context_descriptor mln_webgpu_context_descriptor |
WebGPU backend context fields shared by WebGPU render targets.
| typedef struct mln_wgl_context_descriptor mln_wgl_context_descriptor |
WGL context fields shared by OpenGL render targets on Windows.
| enum mln_opengl_client_api : uint32_t |
| enum mln_opengl_context_ownership : uint32_t |
How a session's OpenGL context relates to the thread that attached it.
A shared session leaves the thread as it found it: every render makes the session context current and restores whatever was current before. The session context joins the host share group named by the descriptor, so a host may hand the session a texture and sample it from its own context.
A dedicated session owns the thread. It makes its context current once and keeps it current between renders, and it joins no share group. Use this when a thread exists to drive one render session and runs no other graphics work, such as an Android host that renders into a SurfaceView.
| Enumerator | |
|---|---|
| MLN_OPENGL_CONTEXT_OWNERSHIP_SHARED | The session shares its thread with host graphics work. |
| MLN_OPENGL_CONTEXT_OWNERSHIP_DEDICATED | The session owns its thread's OpenGL context. |
| enum mln_opengl_context_platform : uint32_t |
| enum mln_opengl_context_provider_flag : uint32_t |
| uint32_t mln_opengl_supported_context_provider_mask | ( | void | ) |
Returns OpenGL context providers supported by this build.
| mln_status mln_render_target_extent_physical_size | ( | const mln_render_target_extent * | extent, |
| uint32_t * | out_width, | ||
| uint32_t * | out_height ) |
Computes the physical device-pixel size of a logical render target extent.
Each dimension is ceil(logical * scale_factor). Session-owned texture targets and surface targets are sized this way. Caller-owned borrowed texture targets state their physical size directly; see texture.h.
Returns: