Structs

These structs are defined in wgpu.structs.

The sructs in wgpu-py are represented as Python dictionaries. Fields that have default values (as indicated below) may be omitted.

wgpu.structs.BindGroupDescriptor
wgpu.structs.BindGroupEntry
wgpu.structs.BindGroupLayoutDescriptor
wgpu.structs.BindGroupLayoutEntry
wgpu.structs.BlendComponent
wgpu.structs.BlendState
wgpu.structs.BufferBinding
  • buffer :: GPUBuffer

  • offset :: int = 0

  • size :: int = None

wgpu.structs.BufferBindingLayout
wgpu.structs.BufferDescriptor
  • label :: str = “”

  • size :: int

  • usage :: flags.BufferUsage

  • mappedAtCreation :: bool = false

wgpu.structs.CanvasConfiguration
wgpu.structs.Color
  • r :: float

  • g :: float

  • b :: float

  • a :: float

wgpu.structs.ColorTargetState
wgpu.structs.CommandBufferDescriptor
  • label :: str = “”

wgpu.structs.CommandEncoderDescriptor
  • label :: str = “”

wgpu.structs.ComputePassDescriptor
wgpu.structs.ComputePassTimestampWrites
  • querySet :: GPUQuerySet

  • beginningOfPassWriteIndex :: int = None

  • endOfPassWriteIndex :: int = None

wgpu.structs.ComputePipelineDescriptor
wgpu.structs.DepthStencilState
wgpu.structs.DeviceDescriptor
wgpu.structs.Extent3D
  • width :: int

  • height :: int = 1

  • depthOrArrayLayers :: int = 1

wgpu.structs.ExternalTextureDescriptor
  • label :: str = “”

  • source :: Union[memoryview, object]

  • colorSpace :: str = “srgb”

wgpu.structs.FragmentState
wgpu.structs.ImageCopyBuffer
  • offset :: int = 0

  • bytesPerRow :: int = None

  • rowsPerImage :: int = None

  • buffer :: GPUBuffer

wgpu.structs.ImageCopyExternalImage
  • source :: Union[memoryview, object]

  • origin :: Union[List[int], structs.Origin2D] = {}

  • flipY :: bool = false

wgpu.structs.ImageCopyTexture
wgpu.structs.ImageDataLayout
  • offset :: int = 0

  • bytesPerRow :: int = None

  • rowsPerImage :: int = None

wgpu.structs.MultisampleState
  • count :: int = 1

  • mask :: int = 0xFFFFFFFF

  • alphaToCoverageEnabled :: bool = false

wgpu.structs.Origin2D
  • x :: int = 0

  • y :: int = 0

wgpu.structs.Origin3D
  • x :: int = 0

  • y :: int = 0

  • z :: int = 0

wgpu.structs.PipelineErrorInit
wgpu.structs.PipelineLayoutDescriptor
wgpu.structs.PrimitiveState
wgpu.structs.ProgrammableStage
  • module :: GPUShaderModule

  • entryPoint :: str = None

  • constants :: Dict[str, float] = None

wgpu.structs.QuerySetDescriptor
wgpu.structs.QueueDescriptor
  • label :: str = “”

wgpu.structs.RenderBundleDescriptor
  • label :: str = “”

wgpu.structs.RenderBundleEncoderDescriptor
  • label :: str = “”

  • colorFormats :: List[enums.TextureFormat]

  • depthStencilFormat :: enums.TextureFormat = None

  • sampleCount :: int = 1

  • depthReadOnly :: bool = false

  • stencilReadOnly :: bool = false

wgpu.structs.RenderPassColorAttachment
wgpu.structs.RenderPassDepthStencilAttachment
wgpu.structs.RenderPassDescriptor
wgpu.structs.RenderPassLayout
wgpu.structs.RenderPassTimestampWrites
  • querySet :: GPUQuerySet

  • beginningOfPassWriteIndex :: int = None

  • endOfPassWriteIndex :: int = None

wgpu.structs.RenderPipelineDescriptor
wgpu.structs.RequestAdapterOptions
wgpu.structs.SamplerBindingLayout
wgpu.structs.SamplerDescriptor
wgpu.structs.ShaderModuleCompilationHint
wgpu.structs.ShaderModuleDescriptor
wgpu.structs.StencilFaceState
wgpu.structs.StorageTextureBindingLayout
wgpu.structs.TextureBindingLayout
wgpu.structs.TextureDescriptor
wgpu.structs.TextureViewDescriptor
wgpu.structs.UncapturedErrorEventInit
wgpu.structs.VertexAttribute
wgpu.structs.VertexBufferLayout
wgpu.structs.VertexState