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
6
7#ifndef MAPLIBRE_NATIVE_C_RENDER_TARGET_H
8#define MAPLIBRE_NATIVE_C_RENDER_TARGET_H
9
10#include <stdint.h>
11
12#include "base.h"
13#include "map.h"
14#include "wake.h"
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
22 MLN_BINDING("native_object=true");
23
25#define MLN_VULKAN_NON_DISPATCHABLE_HANDLE_NULL UINT64_C(0)
26
28#define MLN_TEXTURE_RING_MAX_DEPTH 8u
29
37
49
52
59MLN_BINDING("synchronous=true")
60typedef void (*mln_queue_lock_callback)(void* user_data);
61
69typedef struct mln_queue_lock {
70 mln_queue_lock_callback lock MLN_BINDING("nullable=true");
71 mln_queue_lock_callback unlock MLN_BINDING("nullable=true");
72 void* user_data MLN_BINDING("kind=context");
74} mln_queue_lock MLN_BINDING(
75 "kind=callback_registration;release=release_user_data"
76);
77
109
120
122typedef uint32_t mln_gpu_sync_kind_flags;
123
169
188
190typedef struct mln_gpu_sync {
191 uint32_t size;
194 uint64_t handle MLN_BINDING("lifetime=owner;native_object=true");
195 uint64_t value;
197
203
212 void* instance MLN_BINDING("required=true");
214 void* physical_device MLN_BINDING("required=true");
216 void* device MLN_BINDING("required=true");
221 void* graphics_queue MLN_BINDING("required=true");
228
232 void* instance;
234 void* device MLN_BINDING("required=true");
236 void* queue;
238
247
250
258
266
273
283
287 void* display MLN_BINDING("required=true");
289 void* config MLN_BINDING("required=true");
297
311
320
324 MLN_BINDING("variant=MLN_OPEN_GL_CONTEXT_PLATFORM_WGL");
326 MLN_BINDING("variant=MLN_OPEN_GL_CONTEXT_PLATFORM_EGL");
328 MLN_BINDING("variant=MLN_OPEN_GL_CONTEXT_PLATFORM_WEB_GL");
330
342
347 mln_logical_extent extent, uint32_t* out_width MLN_BINDING("direction=out"),
348 uint32_t* out_height MLN_BINDING("direction=out"),
349 mln_diagnostic* out_diagnostic
350) MLN_NOEXCEPT;
351
355
356#ifdef __cplusplus
357}
358#endif
359
360#endif // MAPLIBRE_NATIVE_C_RENDER_TARGET_H
void(*) mln_user_data_release(void *user_data)
Definition base.h:191
mln_status
Definition base.h:41
uint32_t mln_open_gl_context_provider_flags
Definition render_target.h:249
mln_open_gl_client_api
Definition render_target.h:268
@ MLN_OPEN_GL_CLIENT_API_GL
Definition render_target.h:270
@ MLN_OPEN_GL_CLIENT_API_UNSPECIFIED
Definition render_target.h:269
@ MLN_OPEN_GL_CLIENT_API_GLES
Definition render_target.h:271
void(*) mln_queue_lock_callback(void *user_data)
Definition render_target.h:60
mln_open_gl_context_ownership
Definition render_target.h:260
@ MLN_OPEN_GL_CONTEXT_OWNERSHIP_DEDICATED
Definition render_target.h:264
@ MLN_OPEN_GL_CONTEXT_OWNERSHIP_SHARED
Definition render_target.h:262
mln_open_gl_context_provider_flags mln_open_gl_supported_context_provider_mask(void)
mln_web_gl_context_kind
Definition render_target.h:299
@ MLN_WEB_GL_CONTEXT_TRANSFERRED_CANVAS
Definition render_target.h:309
@ MLN_WEB_GL_CONTEXT_EXISTING
Definition render_target.h:304
mln_gpu_sync_kind
Definition render_target.h:87
@ MLN_GPU_SYNC_SYNC_FD
Definition render_target.h:100
@ MLN_GPU_SYNC_METAL_SHARED_EVENT
Definition render_target.h:102
@ MLN_GPU_SYNC_CPU_COMPLETE
Definition render_target.h:89
@ MLN_GPU_SYNC_VULKAN_TIMELINE_SEMAPHORE
Definition render_target.h:98
@ MLN_GPU_SYNC_OPEN_GL_FENCE
Definition render_target.h:91
@ MLN_GPU_SYNC_D3D12_FENCE
Definition render_target.h:107
@ MLN_GPU_SYNC_QUEUE_ORDER
Definition render_target.h:96
mln_render_session_capability_flag
Definition render_target.h:41
@ MLN_RENDER_SESSION_CAPABILITY_FRAME_ACQUISITION
Definition render_target.h:43
@ MLN_RENDER_SESSION_CAPABILITY_READBACK
Definition render_target.h:45
@ MLN_RENDER_SESSION_CAPABILITY_PRESENTATION
Definition render_target.h:47
mln_open_gl_context_platform
Definition render_target.h:252
@ MLN_OPEN_GL_CONTEXT_PLATFORM_UNSPECIFIED
Definition render_target.h:253
@ MLN_OPEN_GL_CONTEXT_PLATFORM_EGL
Definition render_target.h:255
@ MLN_OPEN_GL_CONTEXT_PLATFORM_WGL
Definition render_target.h:254
@ MLN_OPEN_GL_CONTEXT_PLATFORM_WEB_GL
Definition render_target.h:256
uint64_t mln_vulkan_non_dispatchable_handle
Definition render_target.h:22
mln_open_gl_context_provider_flag
Definition render_target.h:242
@ MLN_OPEN_GL_CONTEXT_PROVIDER_FLAG_EGL
Definition render_target.h:244
@ MLN_OPEN_GL_CONTEXT_PROVIDER_FLAG_WGL
Definition render_target.h:243
@ MLN_OPEN_GL_CONTEXT_PROVIDER_FLAG_WEB_GL
Definition render_target.h:245
mln_render_driver_kind
Definition render_target.h:31
@ MLN_RENDER_DRIVER_CORE_WORKER
Definition render_target.h:33
@ MLN_RENDER_DRIVER_CALLER_GRAPHICS_THREAD
Definition render_target.h:35
mln_gpu_sync_kind_flag
Definition render_target.h:111
@ MLN_GPU_SYNC_KIND_FLAG_D3D12_FENCE
Definition render_target.h:118
@ MLN_GPU_SYNC_KIND_FLAG_METAL_SHARED_EVENT
Definition render_target.h:117
@ MLN_GPU_SYNC_KIND_FLAG_CPU_COMPLETE
Definition render_target.h:112
@ MLN_GPU_SYNC_KIND_FLAG_VULKAN_TIMELINE_SEMAPHORE
Definition render_target.h:115
@ MLN_GPU_SYNC_KIND_FLAG_SYNC_FD
Definition render_target.h:116
@ MLN_GPU_SYNC_KIND_FLAG_OPEN_GL_FENCE
Definition render_target.h:113
@ MLN_GPU_SYNC_KIND_FLAG_QUEUE_ORDER
Definition render_target.h:114
mln_status mln_logical_extent_physical_size(mln_logical_extent extent, uint32_t *out_width, uint32_t *out_height, mln_diagnostic *out_diagnostic)
uint32_t mln_gpu_sync_kind_flags
Definition render_target.h:122
uint32_t mln_render_session_capability_flags
Definition render_target.h:51
Definition base.h:178
Definition base.h:84
Definition render_target.h:285
mln_open_gl_client_api client_api
Definition render_target.h:293
void * get_proc_address
Definition render_target.h:295
void * display
Definition render_target.h:287
void * config
Definition render_target.h:289
void * share_context
Definition render_target.h:291
Definition render_target.h:190
uint32_t size
Definition render_target.h:191
uint64_t value
Definition render_target.h:195
uint64_t handle
Definition render_target.h:194
mln_gpu_sync_kind kind
Definition render_target.h:192
Definition map.h:189
Definition render_target.h:199
void * device
Definition render_target.h:201
Definition render_target.h:337
mln_open_gl_context_descriptor_data data
Definition render_target.h:340
mln_open_gl_context_ownership ownership
Definition render_target.h:339
mln_open_gl_context_platform platform
Definition render_target.h:338
Definition render_target.h:69
mln_queue_lock_callback lock
Definition render_target.h:70
mln_user_data_release release_user_data
Definition render_target.h:73
mln_queue_lock_callback unlock
Definition render_target.h:71
void * user_data
Definition render_target.h:72
Definition render_target.h:125
mln_wake redraw_wake
Definition render_target.h:159
mln_render_driver_kind driver
Definition render_target.h:141
mln_gpu_sync_kind_flags producer_sync_kinds
Definition render_target.h:147
mln_wake driver_work_wake
Definition render_target.h:165
mln_wake frame_wake
Definition render_target.h:153
uint32_t size
Definition render_target.h:126
mln_queue_lock queue_lock
Definition render_target.h:167
Definition render_target.h:171
mln_gpu_sync_kind_flags consumer_sync_kinds
Definition render_target.h:186
uint32_t texture_ring_depth
Definition render_target.h:175
mln_render_driver_kind driver
Definition render_target.h:173
uint32_t size
Definition render_target.h:172
mln_gpu_sync_kind producer_sync_kind
Definition render_target.h:181
mln_render_session_capability_flags flags
Definition render_target.h:176
Definition render_target.h:210
void * instance
Definition render_target.h:212
void * physical_device
Definition render_target.h:214
uint32_t graphics_queue_family_index
Definition render_target.h:222
void * device
Definition render_target.h:216
void * graphics_queue
Definition render_target.h:221
void * get_device_proc_addr
Definition render_target.h:226
void * get_instance_proc_addr
Definition render_target.h:224
Definition wake.h:30
Definition render_target.h:313
int32_t context
Definition render_target.h:316
mln_buffer_view canvas_selector
Definition render_target.h:318
mln_web_gl_context_kind kind
Definition render_target.h:314
Definition render_target.h:230
void * instance
Definition render_target.h:232
void * device
Definition render_target.h:234
void * queue
Definition render_target.h:236
Definition render_target.h:275
void * share_context
Definition render_target.h:279
void * device_context
Definition render_target.h:277
void * get_proc_address
Definition render_target.h:281
Definition render_target.h:322
mln_web_gl_context_descriptor web_gl
Definition render_target.h:328
mln_egl_context_descriptor egl
Definition render_target.h:326
mln_wgl_context_descriptor wgl
Definition render_target.h:324