MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
Toggle main menu visibility
Loading...
Searching...
No Matches
include
maplibre_native_c
offscreen.h
Go to the documentation of this file.
1
5
6
#ifndef MAPLIBRE_NATIVE_C_OFFSCREEN_H
7
#define MAPLIBRE_NATIVE_C_OFFSCREEN_H
8
9
#include <stdint.h>
10
11
#include "
base.h
"
12
#include "
completion.h
"
13
#include "
render_session.h
"
14
#include "
render_target.h
"
15
16
#ifdef __cplusplus
17
extern
"C"
{
18
#endif
19
21
typedef
enum
MLN_BINDING(
22
"kind=bitmask"
23
)
mln_offscreen_device_option_field
: uint32_t {
24
MLN_OFFSCREEN_DEVICE_OPTION_ADAPTER_INDEX
= 1U << 0U,
25
MLN_OFFSCREEN_DEVICE_OPTION_SINGLE_CONTEXT
= 1U << 1U,
26
MLN_OFFSCREEN_DEVICE_OPTION_CLIENT_API
= 1U << 2U,
27
}
mln_offscreen_device_option_field
;
28
30
typedef
uint32_t
mln_offscreen_device_option_fields
;
31
33
typedef
struct
mln_offscreen_device_options
{
34
uint32_t
size
;
35
mln_offscreen_device_option_fields
fields
;
37
uint32_t
adapter_index
38
MLN_BINDING(
"mask=fields;bit=MLN_OFFSCREEN_DEVICE_OPTION_ADAPTER_INDEX"
);
43
bool
single_context
44
MLN_BINDING(
"mask=fields;bit=MLN_OFFSCREEN_DEVICE_OPTION_SINGLE_CONTEXT"
);
53
mln_open_gl_client_api
client_api
54
MLN_BINDING(
"mask=fields;bit=MLN_OFFSCREEN_DEVICE_OPTION_CLIENT_API"
);
55
}
mln_offscreen_device_options
;
56
61
typedef
struct
mln_offscreen_descriptor
{
62
uint32_t
size
;
63
mln_logical_size
logical_size
MLN_BINDING(
"required=true"
);
64
}
mln_offscreen_descriptor
;
65
80
MLN_API
mln_status
mln_offscreen_device_create
(
81
const
mln_offscreen_device_options
* options MLN_BINDING(
"nullable=true"
),
82
mln_offscreen_device
* out_device MLN_BINDING(
"direction=out"
),
83
mln_diagnostic
* out_diagnostic
84
) MLN_NOEXCEPT;
85
91
MLN_API
void
mln_offscreen_device_release
(
92
mln_offscreen_device
device
93
) MLN_NOEXCEPT;
94
110
MLN_BINDING(
"execution=lifecycle"
)
111
MLN_API
mln_status
mln_map_attach_offscreen
(
112
mln_map
map, const
mln_offscreen_descriptor
* descriptor,
113
const
mln_render_session_attach_options
* options,
114
mln_offscreen_device
device MLN_BINDING(
"nullable=true"
),
115
mln_render_session
* out_session MLN_BINDING(
"direction=out"
),
116
const
mln_completion
* completion,
mln_diagnostic
* out_diagnostic
117
) MLN_NOEXCEPT;
118
119
#ifdef __cplusplus
120
}
121
#endif
122
123
#endif
base.h
mln_render_session
uint64_t mln_render_session
Definition
base.h:147
mln_map
uint64_t mln_map
Definition
base.h:112
mln_offscreen_device
uint64_t mln_offscreen_device
Definition
base.h:122
mln_status
mln_status
Definition
base.h:41
completion.h
mln_offscreen_device_option_field
mln_offscreen_device_option_field
Definition
offscreen.h:23
MLN_OFFSCREEN_DEVICE_OPTION_SINGLE_CONTEXT
@ MLN_OFFSCREEN_DEVICE_OPTION_SINGLE_CONTEXT
Definition
offscreen.h:25
MLN_OFFSCREEN_DEVICE_OPTION_CLIENT_API
@ MLN_OFFSCREEN_DEVICE_OPTION_CLIENT_API
Definition
offscreen.h:26
MLN_OFFSCREEN_DEVICE_OPTION_ADAPTER_INDEX
@ MLN_OFFSCREEN_DEVICE_OPTION_ADAPTER_INDEX
Definition
offscreen.h:24
mln_offscreen_device_create
mln_status mln_offscreen_device_create(const mln_offscreen_device_options *options, mln_offscreen_device *out_device, mln_diagnostic *out_diagnostic)
mln_map_attach_offscreen
mln_status mln_map_attach_offscreen(mln_map map, const mln_offscreen_descriptor *descriptor, const mln_render_session_attach_options *options, mln_offscreen_device device, mln_render_session *out_session, const mln_completion *completion, mln_diagnostic *out_diagnostic)
mln_offscreen_device_release
void mln_offscreen_device_release(mln_offscreen_device device)
mln_offscreen_device_option_fields
uint32_t mln_offscreen_device_option_fields
Definition
offscreen.h:30
render_session.h
render_target.h
mln_open_gl_client_api
mln_open_gl_client_api
Definition
render_target.h:268
mln_completion
Definition
completion.h:66
mln_diagnostic
Definition
base.h:84
mln_logical_size
Definition
map.h:196
mln_offscreen_descriptor
Definition
offscreen.h:61
mln_offscreen_descriptor::logical_size
mln_logical_size logical_size
Definition
offscreen.h:63
mln_offscreen_descriptor::size
uint32_t size
Definition
offscreen.h:62
mln_offscreen_device_options
Definition
offscreen.h:33
mln_offscreen_device_options::single_context
bool single_context
Definition
offscreen.h:44
mln_offscreen_device_options::client_api
mln_open_gl_client_api client_api
Definition
offscreen.h:54
mln_offscreen_device_options::size
uint32_t size
Definition
offscreen.h:34
mln_offscreen_device_options::fields
mln_offscreen_device_option_fields fields
Definition
offscreen.h:35
mln_offscreen_device_options::adapter_index
uint32_t adapter_index
Definition
offscreen.h:38
mln_render_session_attach_options
Definition
render_target.h:125
Generated by
1.18.0