WebGPU Headers
The WebGPU C API
 
Loading...
Searching...
No Matches
WGPUSurfaceConfiguration Struct Reference

Data Fields

WGPUChainedStruct const * nextInChain
 
WGPUDevice device
 
WGPUTextureFormat format
 
WGPUTextureUsage usage
 
uint32_t width
 
uint32_t height
 
size_t viewFormatCount
 
WGPUTextureFormat const * viewFormats
 
WGPUCompositeAlphaMode alphaMode
 
WGPUPresentMode presentMode
 

Detailed Description

Options to wgpuSurfaceConfigure for defining how a WGPUSurface will be rendered to and presented to the user. See Surface Configuration for more details.

Default values can be set using WGPU_SURFACE_CONFIGURATION_INIT as initializer.

Definition at line 2889 of file webgpu.h.

Field Documentation

◆ nextInChain

WGPUChainedStruct const* WGPUSurfaceConfiguration::nextInChain

Definition at line 2890 of file webgpu.h.

◆ device

WGPUDevice WGPUSurfaceConfiguration::device

The WGPUDevice to use to render to surface's textures.

Defaults to NULL.

Definition at line 2896 of file webgpu.h.

◆ format

WGPUTextureFormat WGPUSurfaceConfiguration::format

The WGPUTextureFormat of the surface's textures.

Defaults to WGPUTextureFormat_Undefined.

Definition at line 2902 of file webgpu.h.

◆ usage

WGPUTextureUsage WGPUSurfaceConfiguration::usage

The WGPUTextureUsage of the surface's textures.

Defaults to WGPUTextureUsage_RenderAttachment.

Definition at line 2908 of file webgpu.h.

◆ width

uint32_t WGPUSurfaceConfiguration::width

The width of the surface's textures.

Defaults to 0.

Definition at line 2914 of file webgpu.h.

◆ height

uint32_t WGPUSurfaceConfiguration::height

The height of the surface's textures.

Defaults to 0.

Definition at line 2920 of file webgpu.h.

◆ viewFormatCount

size_t WGPUSurfaceConfiguration::viewFormatCount

The additional WGPUTextureFormat for WGPUTextureView format reinterpretation of the surface's textures.

Defaults to NULL.

Definition at line 2926 of file webgpu.h.

◆ viewFormats

WGPUTextureFormat const* WGPUSurfaceConfiguration::viewFormats

Definition at line 2927 of file webgpu.h.

◆ alphaMode

WGPUCompositeAlphaMode WGPUSurfaceConfiguration::alphaMode

How the surface's frames will be composited on the screen.

Defaults to WGPUCompositeAlphaMode_Auto.

Definition at line 2933 of file webgpu.h.

◆ presentMode

WGPUPresentMode WGPUSurfaceConfiguration::presentMode

When and in which order the surface's frames will be shown on the screen. Defaults to WGPUPresentMode_Fifo.

Defaults to WGPUPresentMode_Fifo.

Definition at line 2939 of file webgpu.h.