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

Data Fields

WGPUChainedStruct const * nextInChain
 
WGPUVertexStepMode stepMode
 
uint64_t arrayStride
 
size_t attributeCount
 
WGPUVertexAttribute const * attributes
 

Detailed Description

If attributes is empty and stepMode is WGPUVertexStepMode_Undefined, indicates a "hole" in the parent WGPUVertexState buffers array, with behavior equivalent to null in the JS API.

If attributes is empty but stepMode is not WGPUVertexStepMode_Undefined, indicates a vertex buffer with no attributes, with behavior equivalent to { attributes: [] } in the JS API. (TODO: If the JS API changes not to distinguish these cases, then this distinction doesn't matter and we can remove this documentation.)

If stepMode is WGPUVertexStepMode_Undefined but attributes is not empty, stepMode defaults to WGPUVertexStepMode_Vertex.

Default values can be set using WGPU_VERTEX_BUFFER_LAYOUT_INIT as initializer.

Definition at line 3965 of file webgpu.h.

Field Documentation

◆ nextInChain

WGPUChainedStruct const* WGPUVertexBufferLayout::nextInChain

Definition at line 3966 of file webgpu.h.

◆ stepMode

WGPUVertexStepMode WGPUVertexBufferLayout::stepMode

The INIT macro sets this to WGPUVertexStepMode_Undefined.

Definition at line 3970 of file webgpu.h.

◆ arrayStride

uint64_t WGPUVertexBufferLayout::arrayStride

The INIT macro sets this to 0.

Definition at line 3974 of file webgpu.h.

◆ attributeCount

size_t WGPUVertexBufferLayout::attributeCount

Array count for attributes. The INIT macro sets this to 0.

Definition at line 3978 of file webgpu.h.

◆ attributes

WGPUVertexAttribute const* WGPUVertexBufferLayout::attributes

The INIT macro sets this to NULL.

Definition at line 3982 of file webgpu.h.