MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
Loading...
Searching...
No Matches
texture.h
Go to the documentation of this file.
1
5
6#ifndef MAPLIBRE_NATIVE_C_TEXTURE_H
7#define MAPLIBRE_NATIVE_C_TEXTURE_H
8
9#include <stddef.h>
10#include <stdint.h>
11
12#include "base.h"
13#include "completion.h"
14#include "render_target.h"
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
23 void* texture MLN_BINDING("required=true");
25
40 uint32_t size;
41 mln_logical_size logical_size MLN_BINDING("required=true");
42 uint32_t physical_width MLN_BINDING("required=true");
43 uint32_t physical_height MLN_BINDING("required=true");
45 MLN_BINDING("length=texture_count;required=true");
53
64 uint32_t size;
65 mln_logical_size logical_size MLN_BINDING("required=true");
66 uint32_t physical_width MLN_BINDING("required=true");
67 uint32_t physical_height MLN_BINDING("required=true");
69 MLN_BINDING("length=texture_count;required=true");
72
75 uint32_t size;
76 uint32_t width;
77 uint32_t height;
80 uint32_t slot;
82 void* texture MLN_BINDING("lifetime=owner");
84 void* device MLN_BINDING("lifetime=owner");
86 uint64_t pixel_format;
88
96
112
127 uint32_t size;
128 mln_logical_size logical_size MLN_BINDING("required=true");
129 uint32_t physical_width MLN_BINDING("required=true");
130 uint32_t physical_height MLN_BINDING("required=true");
133 MLN_BINDING("length=texture_count;required=true");
136 uint32_t format MLN_BINDING("required=true");
138 uint32_t final_layout MLN_BINDING("required=true");
141
152 uint32_t size;
153 mln_logical_size logical_size MLN_BINDING("required=true");
154 uint32_t physical_width MLN_BINDING("required=true");
155 uint32_t physical_height MLN_BINDING("required=true");
157 MLN_BINDING("length=texture_count;required=true");
160
163 uint32_t size;
164 uint32_t width;
165 uint32_t height;
168 uint32_t slot;
170 mln_vulkan_non_dispatchable_handle image MLN_BINDING("lifetime=owner");
172 mln_vulkan_non_dispatchable_handle image_view MLN_BINDING("lifetime=owner");
174 void* device MLN_BINDING("lifetime=owner");
176 uint32_t format;
178 uint32_t layout;
180
184 uint32_t texture MLN_BINDING("required=true;native_object=true");
186
203 uint32_t size;
204 mln_logical_size logical_size MLN_BINDING("required=true");
205 uint32_t physical_width MLN_BINDING("required=true");
206 uint32_t physical_height MLN_BINDING("required=true");
209 MLN_BINDING("length=texture_count;required=true");
212 uint32_t target MLN_BINDING("required=true");
214
225 uint32_t size;
226 mln_logical_size logical_size MLN_BINDING("required=true");
227 uint32_t physical_width MLN_BINDING("required=true");
228 uint32_t physical_height MLN_BINDING("required=true");
230 MLN_BINDING("length=texture_count;required=true");
233
237 void* texture MLN_BINDING("required=true");
239 void* texture_view MLN_BINDING("required=true");
241
257 uint32_t size;
258 mln_logical_size logical_size MLN_BINDING("required=true");
259 uint32_t physical_width MLN_BINDING("required=true");
260 uint32_t physical_height MLN_BINDING("required=true");
263 MLN_BINDING("length=texture_count;required=true");
266 uint32_t format MLN_BINDING("required=true");
268
279 uint32_t size;
280 mln_logical_size logical_size MLN_BINDING("required=true");
281 uint32_t physical_width MLN_BINDING("required=true");
282 uint32_t physical_height MLN_BINDING("required=true");
284 MLN_BINDING("length=texture_count;required=true");
287
290 uint32_t size;
291 uint32_t width;
292 uint32_t height;
295 uint32_t slot;
297 void* texture MLN_BINDING("lifetime=owner");
299 void* texture_view MLN_BINDING("lifetime=owner");
301 void* device MLN_BINDING("lifetime=owner");
303 uint32_t format;
305
308 uint32_t size;
309 uint32_t width;
310 uint32_t height;
313 uint32_t slot;
314 uint32_t texture MLN_BINDING("lifetime=owner");
315 uint32_t target;
317
326
336
345MLN_BINDING("execution=lifecycle;platforms=ios,macos,tvos,visionos")
347 mln_map map, const mln_metal_borrowed_texture_descriptor* descriptor,
349 mln_render_session* out_session MLN_BINDING("direction=out"),
350 const mln_completion* completion, mln_diagnostic* out_diagnostic
351) MLN_NOEXCEPT;
352
361MLN_BINDING(
362 "execution=lifecycle;platforms=android,freebsd,linux,macos,ohos,windows"
363)
365 mln_map map, const mln_vulkan_borrowed_texture_descriptor* descriptor,
367 mln_render_session* out_session MLN_BINDING("direction=out"),
368 const mln_completion* completion, mln_diagnostic* out_diagnostic
369) MLN_NOEXCEPT;
370
379MLN_BINDING("execution=lifecycle")
383 mln_render_session* out_session MLN_BINDING("direction=out"),
384 const mln_completion* completion, mln_diagnostic* out_diagnostic
385) MLN_NOEXCEPT;
386
395MLN_BINDING("execution=lifecycle;platforms=web")
399 mln_render_session* out_session MLN_BINDING("direction=out"),
400 const mln_completion* completion, mln_diagnostic* out_diagnostic
401) MLN_NOEXCEPT;
402
414MLN_BINDING("execution=operation;platforms=ios,macos,tvos,visionos")
416 mln_render_session session,
418 const mln_completion* completion, mln_diagnostic* out_diagnostic
419) MLN_NOEXCEPT;
420
428MLN_BINDING(
429 "execution=operation;platforms=android,freebsd,linux,macos,ohos,windows"
430)
432 mln_render_session session,
434 const mln_completion* completion, mln_diagnostic* out_diagnostic
435) MLN_NOEXCEPT;
436
444MLN_BINDING("execution=operation")
446 mln_render_session session,
448 const mln_completion* completion, mln_diagnostic* out_diagnostic
449) MLN_NOEXCEPT;
450
458MLN_BINDING("execution=operation;platforms=web")
460 mln_render_session session,
462 const mln_completion* completion, mln_diagnostic* out_diagnostic
463) MLN_NOEXCEPT;
464
474MLN_BINDING("execution=query;result=mln_texture_readback_result")
476 mln_render_session session, const mln_completion* completion,
477 mln_diagnostic* out_diagnostic
478) MLN_NOEXCEPT;
479
493MLN_BINDING("view_owner=frame;platforms=ios,macos,tvos,visionos")
495 mln_acquired_frame frame,
496 mln_metal_texture_frame* out_frame MLN_BINDING("direction=out"),
497 mln_diagnostic* out_diagnostic
498) MLN_NOEXCEPT;
499
513MLN_BINDING(
514 "view_owner=frame;platforms=android,freebsd,linux,macos,ohos,windows"
515)
517 mln_acquired_frame frame,
518 mln_vulkan_texture_frame* out_frame MLN_BINDING("direction=out"),
519 mln_diagnostic* out_diagnostic
520) MLN_NOEXCEPT;
521
535MLN_BINDING("view_owner=frame")
537 mln_acquired_frame frame,
538 mln_open_gl_texture_frame* out_frame MLN_BINDING("direction=out"),
539 mln_diagnostic* out_diagnostic
540) MLN_NOEXCEPT;
541
555MLN_BINDING("view_owner=frame;platforms=web")
557 mln_acquired_frame frame,
558 mln_web_gpu_texture_frame* out_frame MLN_BINDING("direction=out"),
559 mln_diagnostic* out_diagnostic
560) MLN_NOEXCEPT;
561
562#ifdef __cplusplus
563}
564#endif
565
566#endif // MAPLIBRE_NATIVE_C_TEXTURE_H
uint64_t mln_render_session
Definition base.h:147
uint64_t mln_map
Definition base.h:112
uint64_t mln_acquired_frame
Definition base.h:154
mln_status
Definition base.h:41
uint64_t mln_vulkan_non_dispatchable_handle
Definition render_target.h:22
Definition base.h:178
Definition completion.h:66
Definition base.h:84
Definition map.h:196
uint32_t physical_height
Definition texture.h:43
const mln_metal_borrowed_texture * textures
Definition texture.h:45
void * command_queue
Definition texture.h:51
uint32_t physical_width
Definition texture.h:42
size_t texture_count
Definition texture.h:46
uint32_t size
Definition texture.h:40
mln_logical_size logical_size
Definition texture.h:41
uint32_t size
Definition texture.h:64
const mln_metal_borrowed_texture * textures
Definition texture.h:69
size_t texture_count
Definition texture.h:70
mln_logical_size logical_size
Definition texture.h:65
uint32_t physical_height
Definition texture.h:67
uint32_t physical_width
Definition texture.h:66
Definition texture.h:21
void * texture
Definition texture.h:23
Definition texture.h:74
uint32_t slot
Definition texture.h:80
void * texture
Definition texture.h:82
uint64_t pixel_format
Definition texture.h:86
uint32_t size
Definition texture.h:75
double scale_factor
Definition texture.h:78
void * device
Definition texture.h:84
uint32_t height
Definition texture.h:77
uint32_t width
Definition texture.h:76
const mln_open_gl_borrowed_texture * textures
Definition texture.h:209
uint32_t physical_height
Definition texture.h:206
mln_logical_size logical_size
Definition texture.h:204
mln_open_gl_context_descriptor context
Definition texture.h:207
uint32_t physical_width
Definition texture.h:205
size_t texture_count
Definition texture.h:210
uint32_t size
Definition texture.h:203
uint32_t target
Definition texture.h:212
uint32_t physical_height
Definition texture.h:228
uint32_t physical_width
Definition texture.h:227
mln_logical_size logical_size
Definition texture.h:226
const mln_open_gl_borrowed_texture * textures
Definition texture.h:230
size_t texture_count
Definition texture.h:231
uint32_t size
Definition texture.h:225
Definition texture.h:182
uint32_t texture
Definition texture.h:184
Definition render_target.h:337
Definition texture.h:307
double scale_factor
Definition texture.h:311
uint32_t height
Definition texture.h:310
uint32_t target
Definition texture.h:315
uint32_t slot
Definition texture.h:313
uint32_t width
Definition texture.h:309
uint32_t texture
Definition texture.h:314
uint32_t size
Definition texture.h:308
Definition render_target.h:125
Definition texture.h:319
uint32_t width
Definition texture.h:320
size_t byte_length
Definition texture.h:324
uint32_t stride
Definition texture.h:323
uint32_t height
Definition texture.h:321
Definition texture.h:328
mln_texture_image_info info
Definition texture.h:334
mln_buffer_view data
Definition texture.h:333
uint32_t final_layout
Definition texture.h:138
const mln_vulkan_borrowed_texture * textures
Definition texture.h:133
uint32_t physical_height
Definition texture.h:130
uint32_t size
Definition texture.h:127
mln_vulkan_image_owner owner
Definition texture.h:139
mln_logical_size logical_size
Definition texture.h:128
uint32_t physical_width
Definition texture.h:129
uint32_t format
Definition texture.h:136
mln_vulkan_context_descriptor context
Definition texture.h:131
size_t texture_count
Definition texture.h:134
uint32_t physical_width
Definition texture.h:154
uint32_t size
Definition texture.h:152
uint32_t physical_height
Definition texture.h:155
size_t texture_count
Definition texture.h:158
mln_logical_size logical_size
Definition texture.h:153
const mln_vulkan_borrowed_texture * textures
Definition texture.h:157
Definition texture.h:90
mln_vulkan_non_dispatchable_handle image_view
Definition texture.h:94
mln_vulkan_non_dispatchable_handle image
Definition texture.h:92
Definition render_target.h:210
Definition texture.h:162
uint32_t layout
Definition texture.h:178
double scale_factor
Definition texture.h:166
void * device
Definition texture.h:174
mln_vulkan_non_dispatchable_handle image
Definition texture.h:170
uint32_t size
Definition texture.h:163
uint32_t format
Definition texture.h:176
uint32_t width
Definition texture.h:164
uint32_t slot
Definition texture.h:168
uint32_t height
Definition texture.h:165
mln_vulkan_non_dispatchable_handle image_view
Definition texture.h:172
const mln_web_gpu_borrowed_texture * textures
Definition texture.h:263
mln_web_gpu_context_descriptor context
Definition texture.h:261
mln_logical_size logical_size
Definition texture.h:258
size_t texture_count
Definition texture.h:264
uint32_t format
Definition texture.h:266
uint32_t physical_height
Definition texture.h:260
uint32_t size
Definition texture.h:257
uint32_t physical_width
Definition texture.h:259
size_t texture_count
Definition texture.h:285
uint32_t physical_width
Definition texture.h:281
uint32_t physical_height
Definition texture.h:282
const mln_web_gpu_borrowed_texture * textures
Definition texture.h:284
mln_logical_size logical_size
Definition texture.h:280
uint32_t size
Definition texture.h:279
Definition texture.h:235
void * texture_view
Definition texture.h:239
void * texture
Definition texture.h:237
Definition render_target.h:230
Definition texture.h:289
uint32_t height
Definition texture.h:292
uint32_t width
Definition texture.h:291
double scale_factor
Definition texture.h:293
uint32_t slot
Definition texture.h:295
uint32_t format
Definition texture.h:303
uint32_t size
Definition texture.h:290
void * texture
Definition texture.h:297
void * device
Definition texture.h:301
void * texture_view
Definition texture.h:299
mln_status mln_render_session_set_vulkan_borrowed_texture_target(mln_render_session session, const mln_vulkan_borrowed_texture_replacement *replacement, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_status mln_map_attach_metal_borrowed_texture(mln_map map, const mln_metal_borrowed_texture_descriptor *descriptor, const mln_render_session_attach_options *options, mln_render_session *out_session, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_status mln_render_session_set_web_gpu_borrowed_texture_target(mln_render_session session, const mln_web_gpu_borrowed_texture_replacement *replacement, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_status mln_acquired_frame_get_metal_texture(mln_acquired_frame frame, mln_metal_texture_frame *out_frame, mln_diagnostic *out_diagnostic)
mln_status mln_render_session_set_metal_borrowed_texture_target(mln_render_session session, const mln_metal_borrowed_texture_replacement *replacement, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_status mln_map_attach_open_gl_borrowed_texture(mln_map map, const mln_open_gl_borrowed_texture_descriptor *descriptor, const mln_render_session_attach_options *options, mln_render_session *out_session, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_status mln_acquired_frame_get_web_gpu_texture(mln_acquired_frame frame, mln_web_gpu_texture_frame *out_frame, mln_diagnostic *out_diagnostic)
mln_status mln_acquired_frame_get_open_gl_texture(mln_acquired_frame frame, mln_open_gl_texture_frame *out_frame, mln_diagnostic *out_diagnostic)
mln_status mln_acquired_frame_get_vulkan_texture(mln_acquired_frame frame, mln_vulkan_texture_frame *out_frame, mln_diagnostic *out_diagnostic)
mln_status mln_map_attach_vulkan_borrowed_texture(mln_map map, const mln_vulkan_borrowed_texture_descriptor *descriptor, const mln_render_session_attach_options *options, mln_render_session *out_session, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_vulkan_image_owner
Definition texture.h:104
@ MLN_VULKAN_IMAGE_OWNER_GRAPHICS_QUEUE
Definition texture.h:106
@ MLN_VULKAN_IMAGE_OWNER_EXTERNAL
Definition texture.h:108
@ MLN_VULKAN_IMAGE_OWNER_FOREIGN
Definition texture.h:110
mln_status mln_render_session_read_texture(mln_render_session session, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_status mln_render_session_set_open_gl_borrowed_texture_target(mln_render_session session, const mln_open_gl_borrowed_texture_replacement *replacement, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_status mln_map_attach_web_gpu_borrowed_texture(mln_map map, const mln_web_gpu_borrowed_texture_descriptor *descriptor, const mln_render_session_attach_options *options, mln_render_session *out_session, const mln_completion *completion, mln_diagnostic *out_diagnostic)