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

#include <surface.h>

Data Fields

mln_logical_extent extent
mln_webgpu_context_descriptor context
void * surface
uint32_t format

Detailed Description

WebGPU attachment options for a native surface.

Field Documentation

◆ context

mln_webgpu_context_descriptor mln_webgpu_surface_descriptor::context

Borrowed WebGPU context. device is required.

◆ extent

mln_logical_extent mln_webgpu_surface_descriptor::extent

Logical surface extent. A scale_factor that differs from the map's is accepted and logged as a warning.

◆ format

uint32_t mln_webgpu_surface_descriptor::format

WGPUTextureFormat to configure the surface with. Required. A browser host takes it from navigator.gpu.getPreferredCanvasFormat().

◆ surface

void* mln_webgpu_surface_descriptor::surface

Borrowed WGPUSurface. Required, and must stay alive for the session. The session configures it for this device and extent, and unconfigures it when the session ends.


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