Table of Contents

Struct MetalBorrowedTextureDescriptor

Namespace
Maplibre.NativeFfi
Assembly
Maplibre.NativeFfi.dll

A ring of your Metal textures, for MapHandle.AttachMetalBorrowedTexture().

public readonly record struct MetalBorrowedTextureDescriptor : IEquatable<MetalBorrowedTextureDescriptor>
Implements
Inherited Members

Remarks

logical_size sets the map's size. physical_width and physical_height give the textures' size in pixels, which is usually logical_size times the map's scale factor. The textures must all have that size, one device, one pixel format, one sample, and MTLTextureUsageRenderTarget. The ring holds up to MaplibreNative.TextureRingMaxDepth distinct textures.

The session uses the textures until a replacement or release of the target completes, a detach or release of the session completes, or an abandon of it returns.

See mln_metal_borrowed_texture_descriptor in the C API reference.

Constructors

MetalBorrowedTextureDescriptor(LogicalSize, uint, uint, ImmutableArray<MetalBorrowedTexture>, NativePointer)

[SetsRequiredMembers]
public MetalBorrowedTextureDescriptor(LogicalSize LogicalSize, uint PhysicalWidth, uint PhysicalHeight, ImmutableArray<MetalBorrowedTexture> Textures, NativePointer CommandQueue)

Parameters

LogicalSize LogicalSize
PhysicalWidth uint
PhysicalHeight uint
Textures ImmutableArray<MetalBorrowedTexture>
CommandQueue NativePointer

Properties

CommandQueue

Your MTLCommandQueue on the textures' device, or null for a queue of the session's own. With your queue, frames can use GpuSyncKind.QueueOrder.

public NativePointer CommandQueue { get; init; }

Property Value

NativePointer

LogicalSize

public required LogicalSize LogicalSize { get; init; }

Property Value

LogicalSize

PhysicalHeight

public required uint PhysicalHeight { get; init; }

Property Value

uint

PhysicalWidth

public required uint PhysicalWidth { get; init; }

Property Value

uint

Textures

public required ImmutableArray<MetalBorrowedTexture> Textures { get; init; }

Property Value

ImmutableArray<MetalBorrowedTexture>