|
MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
|
#include <texture.h>
Data Fields | |
| mln_logical_extent | extent |
| uint32_t | physical_width |
| uint32_t | physical_height |
| mln_opengl_context_descriptor | context |
| const mln_opengl_borrowed_texture * | textures |
| size_t | texture_count |
| uint32_t | target |
OpenGL attachment options for a borrowed texture target.
| mln_opengl_context_descriptor mln_opengl_borrowed_texture_descriptor::context |
Borrowed OpenGL context provider data. The textures must belong to this context or a context in the same share group.
| mln_logical_extent mln_opengl_borrowed_texture_descriptor::extent |
Logical texture extent; physical_width and physical_height give the texture's size. A scale_factor that differs from the map's is accepted and logged as a warning.
| uint32_t mln_opengl_borrowed_texture_descriptor::physical_height |
Physical texture height in device pixels. Must be positive. Defaults to
| uint32_t mln_opengl_borrowed_texture_descriptor::physical_width |
Physical texture width in device pixels. Must be positive. Defaults to
| uint32_t mln_opengl_borrowed_texture_descriptor::target |
OpenGL texture target of every texture. Must be GL_TEXTURE_2D.
| size_t mln_opengl_borrowed_texture_descriptor::texture_count |
Number of textures, which is the ring depth, from one to MLN_TEXTURE_RING_MAX_DEPTH. A replacement keeps the count the session attached with.
| const mln_opengl_borrowed_texture* mln_opengl_borrowed_texture_descriptor::textures |
The ring's textures, one per slot, in slot order. Required.
The call copies the array before it returns. Only the textures it names must stay valid: until set_target replaces them, until detach completes, or until abandon returns. The textures are distinct.
The caller must guarantee that each texture's level-0 dimensions equal physical_width and physical_height. The session does not validate those dimensions.