MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
Loading...
Searching...
No Matches
render_target.h
Go to the documentation of this file.
1
5
6#ifndef MAPLIBRE_NATIVE_C_RENDER_TARGET_H
7#define MAPLIBRE_NATIVE_C_RENDER_TARGET_H
8
9#include <stdint.h>
10
11#include "base.h"
12#include "map.h"
13#include "wake.h"
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
26
28#define MLN_VULKAN_NON_DISPATCHABLE_HANDLE_NULL UINT64_C(0)
29
31#define MLN_TEXTURE_RING_MAX_DEPTH 8
32
46
48typedef enum MLN_BINDING(
49 "kind=bitmask"
51 MLN_RENDER_SESSION_CAPABILITY_FRAME_ACQUISITION = 1U << 0U,
52 MLN_RENDER_SESSION_CAPABILITY_READBACK = 1U << 1U,
53 MLN_RENDER_SESSION_CAPABILITY_CONSUMER_SYNC = 1U << 2U,
54 MLN_RENDER_SESSION_CAPABILITY_PRESENTATION = 1U << 3U,
56
61MLN_BINDING("synchronous=true")
62typedef void (*mln_queue_lock_callback)(void* user_data);
63
87typedef struct mln_queue_lock {
88 mln_queue_lock_callback lock MLN_BINDING("nullable=true");
89 mln_queue_lock_callback unlock MLN_BINDING("nullable=true");
90 void* user_data MLN_BINDING("kind=context");
98 "kind=callback_registration;release=release_user_data"
99);
100
152
155 uint32_t size;
157 uint32_t driver MLN_BINDING("enum=mln_render_driver_kind");
164 uint32_t flags MLN_BINDING("enum=mln_render_session_capability_flag");
166
211
217typedef struct mln_gpu_sync {
218 uint32_t size;
220 uint32_t kind MLN_BINDING("enum=mln_gpu_sync_kind");
226 uint64_t object;
228
230MLN_API mln_gpu_sync mln_gpu_sync_default(void) MLN_NOEXCEPT;
231
237
259
272
274typedef enum MLN_BINDING(
275 "kind=bitmask"
277 MLN_OPENGL_CONTEXT_PROVIDER_FLAG_WGL = 1u << 0u,
278 MLN_OPENGL_CONTEXT_PROVIDER_FLAG_EGL = 1u << 1u,
282
284typedef enum mln_opengl_context_platform : uint32_t {
287 MLN_OPENGL_CONTEXT_PLATFORM_WGL = 1u,
288 MLN_OPENGL_CONTEXT_PLATFORM_EGL = 2u,
292
315
325
342
375
386
401
405 MLN_BINDING("variant=MLN_OPENGL_CONTEXT_PLATFORM_WGL");
407 MLN_BINDING("variant=MLN_OPENGL_CONTEXT_PLATFORM_EGL");
409 MLN_BINDING("variant=MLN_OPENGL_CONTEXT_PLATFORM_WEBGL");
411
415 uint32_t platform MLN_BINDING("enum=mln_opengl_context_platform");
421 uint32_t ownership MLN_BINDING("enum=mln_opengl_context_ownership");
424
431
446 mln_logical_extent extent, uint32_t* out_width MLN_BINDING("direction=out"),
447 uint32_t* out_height MLN_BINDING("direction=out"),
448 mln_diagnostic* out_diagnostic
449) MLN_NOEXCEPT;
450
454MLN_BINDING("enum=mln_opengl_context_provider_flag")
455MLN_API uint32_t mln_opengl_supported_context_provider_mask(void) MLN_NOEXCEPT;
456
457#ifdef __cplusplus
458}
459#endif
460
461#endif // MAPLIBRE_NATIVE_C_RENDER_TARGET_H
void(*) mln_user_data_release(void *user_data)
Definition base.h:205
mln_status
Definition base.h:61
#define MLN_BINDING(contract)
Definition binding.h:17
void(*) mln_queue_lock_callback(void *user_data)
Definition render_target.h:62
mln_gpu_sync_kind
Definition render_target.h:168
@ MLN_GPU_SYNC_CPU_COMPLETE
Definition render_target.h:184
@ MLN_GPU_SYNC_OPENGL_FENCE
Definition render_target.h:209
mln_gpu_sync mln_gpu_sync_default(void)
mln_webgl_context_kind
Definition render_target.h:377
@ MLN_WEBGL_CONTEXT_EXISTING
Definition render_target.h:379
@ MLN_WEBGL_CONTEXT_TRANSFERRED_CANVAS
Definition render_target.h:384
mln_render_session_capability_flag
Definition render_target.h:50
uint64_t mln_vulkan_non_dispatchable_handle
Definition render_target.h:25
mln_render_driver_kind
Definition render_target.h:34
@ MLN_RENDER_DRIVER_CORE_WORKER
Definition render_target.h:39
@ MLN_RENDER_DRIVER_CALLER_GRAPHICS_THREAD
Definition render_target.h:44
mln_opengl_context_platform
Definition render_target.h:284
@ MLN_OPENGL_CONTEXT_PLATFORM_UNSPECIFIED
Definition render_target.h:286
@ MLN_OPENGL_CONTEXT_PLATFORM_WEBGL
Definition render_target.h:290
mln_opengl_context_provider_flag
Definition render_target.h:276
@ MLN_OPENGL_CONTEXT_PROVIDER_FLAG_WEBGL
Definition render_target.h:280
mln_opengl_client_api
Definition render_target.h:317
@ MLN_OPENGL_CLIENT_API_GL
Definition render_target.h:321
@ MLN_OPENGL_CLIENT_API_UNSPECIFIED
Definition render_target.h:319
@ MLN_OPENGL_CLIENT_API_GLES
Definition render_target.h:323
mln_status mln_logical_extent_physical_size(mln_logical_extent extent, uint32_t *out_width, uint32_t *out_height, mln_diagnostic *out_diagnostic)
mln_render_session_attach_options mln_render_session_attach_options_default(void)
uint32_t mln_opengl_supported_context_provider_mask(void)
mln_opengl_context_ownership
Definition render_target.h:309
@ MLN_OPENGL_CONTEXT_OWNERSHIP_SHARED
Definition render_target.h:311
@ MLN_OPENGL_CONTEXT_OWNERSHIP_DEDICATED
Definition render_target.h:313
Definition base.h:192
Definition base.h:100
Definition render_target.h:344
uint32_t client_api
Definition render_target.h:371
void * get_proc_address
Definition render_target.h:373
void * display
Definition render_target.h:352
void * config
Definition render_target.h:358
void * share_context
Definition render_target.h:365
Definition render_target.h:217
uint32_t kind
Definition render_target.h:220
uint64_t object
Definition render_target.h:226
Definition map.h:162
Definition render_target.h:233
void * device
Definition render_target.h:235
Definition render_target.h:413
uint32_t ownership
Definition render_target.h:421
uint32_t platform
Definition render_target.h:415
Definition render_target.h:87
mln_user_data_release release_user_data
Definition render_target.h:96
Definition render_target.h:112
uint32_t requested_texture_ring_depth
Definition render_target.h:126
mln_wake driver_work_wake
Definition render_target.h:144
mln_wake frame_wake
Definition render_target.h:135
uint32_t producer_sync_kind
Definition render_target.h:133
mln_queue_lock queue_lock
Definition render_target.h:150
uint32_t driver
Definition render_target.h:118
Definition render_target.h:154
uint32_t flags
Definition render_target.h:164
uint32_t driver
Definition render_target.h:157
uint32_t texture_ring_depth
Definition render_target.h:162
Definition render_target.h:239
void * instance
Definition render_target.h:241
void * physical_device
Definition render_target.h:243
uint32_t graphics_queue_family_index
Definition render_target.h:253
void * device
Definition render_target.h:245
void * graphics_queue
Definition render_target.h:251
void * get_device_proc_addr
Definition render_target.h:257
void * get_instance_proc_addr
Definition render_target.h:255
Definition wake.h:47
Definition render_target.h:388
uint32_t kind
Definition render_target.h:390
mln_buffer_view canvas_selector
Definition render_target.h:399
int32_t context
Definition render_target.h:394
Definition render_target.h:261
void * queue
Definition render_target.h:270
void * instance
Definition render_target.h:263
void * device
Definition render_target.h:265
Definition render_target.h:327
void * share_context
Definition render_target.h:338
void * device_context
Definition render_target.h:332
void * get_proc_address
Definition render_target.h:340
Definition render_target.h:403