MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
Loading...
Searching...
No Matches
render_target.h File Reference

Go to the source code of this file.

Data Structures

struct  mln_render_target_extent
 
struct  mln_metal_context_descriptor
 
struct  mln_vulkan_context_descriptor
 
struct  mln_wgl_context_descriptor
 
struct  mln_egl_context_descriptor
 
struct  mln_opengl_context_descriptor
 

Enumerations

enum  mln_opengl_context_provider_flag : uint32_t
 
enum  mln_opengl_context_platform : uint32_t { MLN_OPENGL_CONTEXT_PLATFORM_UNSPECIFIED = 0u , MLN_OPENGL_CONTEXT_PLATFORM_WGL = 1u , MLN_OPENGL_CONTEXT_PLATFORM_EGL = 2u }
 

Functions

mln_status mln_render_target_extent_physical_size (const mln_render_target_extent *extent, uint32_t *out_width, uint32_t *out_height)
 
uint32_t mln_opengl_supported_context_provider_mask (void)
 

Detailed Description

Shared public C API declarations for render target descriptors.

Enumeration Type Documentation

◆ mln_opengl_context_platform

enum mln_opengl_context_platform : uint32_t

OpenGL platform context provider used by a context descriptor.

Enumerator
MLN_OPENGL_CONTEXT_PLATFORM_UNSPECIFIED 

No OpenGL context provider is selected.

◆ mln_opengl_context_provider_flag

OpenGL context providers supported by this build.

Function Documentation

◆ mln_opengl_supported_context_provider_mask()

uint32_t mln_opengl_supported_context_provider_mask ( void )

Returns OpenGL context providers supported by this build.

◆ mln_render_target_extent_physical_size()

mln_status mln_render_target_extent_physical_size ( const mln_render_target_extent * extent,
uint32_t * out_width,
uint32_t * out_height )

Computes the physical device-pixel size of a logical render target extent.

Each dimension is ceil(logical * scale_factor). Session-owned texture targets and surface targets are sized this way, so callers that allocate host resources alongside them can use this instead of repeating the formula.

Caller-owned borrowed texture targets state their physical size directly and do not derive it; see texture.h. Not every physical size is reachable from a logical extent, so a caller that starts from a physical size it does not control states that size rather than solving for a logical extent.

Returns:

  • MLN_STATUS_OK on success.
  • MLN_STATUS_INVALID_ARGUMENT when extent is null or invalid, out_width or out_height is null, or the scaled dimensions are too large.