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_render_target_extent extent
 
uint32_t physical_width
 
uint32_t physical_height
 
void * texture
 

Detailed Description

Metal caller-owned texture session attachment options.

Field Documentation

◆ extent

mln_render_target_extent mln_metal_borrowed_texture_descriptor::extent

Logical texture extent. The map viewport uses width and height and the renderer uses scale_factor; the physical size is stated separately below.

◆ physical_height

uint32_t mln_metal_borrowed_texture_descriptor::physical_height

Physical texture height in device pixels. Must be positive.

◆ physical_width

uint32_t mln_metal_borrowed_texture_descriptor::physical_width

Physical texture width in device pixels. Must be positive.

◆ texture

void* mln_metal_borrowed_texture_descriptor::texture

Borrowed id<MTLTexture> / MTL::Texture*. Required.

The texture's pixel dimensions must equal physical_width and physical_height, the texture must allow render-target usage, and it must be single-sample, because the session builds single-sample depth and stencil attachments to match. The session reads all three from the texture and rejects a mismatch. The caller owns the texture and must keep it valid until detach or destroy.


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