MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
Loading...
Searching...
No Matches
mln_metal_borrowed_texture_descriptor Struct Reference

#include <texture.h>

Data Fields

mln_logical_extent extent
uint32_t physical_width
uint32_t physical_height
const mln_metal_borrowed_texture * textures
size_t texture_count

Detailed Description

Metal attachment options for a borrowed texture target.

Field Documentation

◆ extent

mln_logical_extent mln_metal_borrowed_texture_descriptor::extent

Logical texture extent; physical_width and physical_height give the texture's size. A scale_factor that differs from the map's is accepted and logged as a warning.

◆ physical_height

uint32_t mln_metal_borrowed_texture_descriptor::physical_height

Physical texture height in device pixels. Must be positive. Defaults to

◆ physical_width

uint32_t mln_metal_borrowed_texture_descriptor::physical_width

Physical texture width in device pixels. Must be positive. Defaults to

◆ texture_count

size_t mln_metal_borrowed_texture_descriptor::texture_count

Number of textures, which is the ring depth, from one to MLN_TEXTURE_RING_MAX_DEPTH. A replacement keeps the count the session attached with.

◆ textures

const mln_metal_borrowed_texture* mln_metal_borrowed_texture_descriptor::textures

The ring's textures, one per slot, in slot order. Required.

The call copies the array before it returns. Only the textures it names must stay valid: until set_target replaces them, until detach completes, or until abandon returns. The textures are distinct and share one device and one pixel format. Each texture's pixel dimensions equal physical_width and physical_height, and each allows render-target usage and is single-sample. A mismatch is rejected.


The documentation for this struct was generated from the following file: