|
MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
|
Go to the source code of this file.
Functions | |
| mln_plugin_register_function_v1 | mln_plugin_get_register_function_v1 (void) |
Layer plugin registration.
Native plugins register style layer types through mln_plugin_register_v1(). The plugin contract is declared in mln/plugin/plugin_api.h, installed next to this library's headers and versioned independently of the map API. Include this header separately from maplibre_native_c.h.
A plugin integration calls its own registration entry point with the function returned by mln_plugin_get_register_function_v1(), once per process and before any style that uses its layer types loads. The integration owns loading the plugin and keeping its code loaded for the process lifetime.
The plugin must be built against the same MapLibre Native revision as the library; upstream does not yet promise ABI stability for this API.
Plugin callbacks run on native tile workers and the render thread and may run during process exit, after host exit handlers and static destructors. A plugin must not use state that those destroy.
The plugin API declares shaders for the OpenGL, Vulkan, and Metal backends. A WebGPU build registers plugins but has no shader path for their layers.
| mln_plugin_register_function_v1 mln_plugin_get_register_function_v1 | ( | void | ) |
Returns the process-wide mln_plugin_register_v1 entry point; never null.