flutter_wgpu library

Classes

BufferMapping
Handle for an in-progress or completed buffer mapping.
ByteData
A fixed-length, random-access sequence of bytes that also provides random and unaligned access to the fixed-width integers and floating point numbers represented by those bytes.
Endian
Endianness of number representation.
GpuAdapter
A GPU adapter — represents a physical GPU.
GpuAdapterInfo
Information about a GPU adapter.
GpuBindGroup
A bind group that binds resources to shader bindings.
GpuBindGroupEntry
A single entry in a bind group.
GpuBindGroupLayout
A bind group layout defining the interface between resources and shader stages.
GpuBindGroupLayoutEntry
A single entry in a bind group layout.
GpuBlendComponent
Blend component (for color or alpha).
GpuBlendState
Blend state for a color target.
GpuBuffer
A GPU buffer.
GpuBufferBinding
Binds a buffer (or a range of it) to a binding slot.
GpuBufferBindingLayout
Buffer binding layout entry.
GpuBufferUsage
Buffer usage flag constants.
GpuColor
RGBA color.
GpuColorAttachment
Color attachment for a render pass.
GpuColorTargetState
Color target state.
GpuColorWrite
Color write mask bits.
GpuCommandBuffer
A recorded command buffer ready for submission.
GpuCommandEncoder
A command encoder for recording GPU commands.
GpuCompilationMessage
A message from shader compilation.
GpuComputePassEncoder
A compute pass encoder for recording compute dispatch commands.
GpuComputePassTimestampWrites
Timestamp writes for a compute pass.
GpuComputePipeline
A compute pipeline.
GpuDepthStencilAttachment
Depth/stencil attachment for a render pass.
GpuDepthStencilState
Depth stencil state.
GpuDevice
A logical GPU device for creating resources.
GpuDeviceDescriptor
Configuration for requesting a device.
GpuDeviceLostInfo
Information about a device loss event.
GpuError
A GPU error captured by an error scope.
GpuInstance
A GPU instance — entry point for GPU access.
GpuInternalError
An internal error.
GpuLimits
Hardware limits for a GPU adapter or device.
GpuMapMode
Map mode flag constants.
GpuObjectBase
Base interface for all GPU objects with a debug label.
GpuOutOfMemoryError
An out-of-memory error.
GpuPipelineLayout
A pipeline layout that groups bind group layouts.
GpuQuerySet
A set of GPU queries.
GpuQueue
Command queue for submitting GPU work.
GpuRenderBundle
A pre-recorded bundle of render commands.
GpuRenderBundleEncoder
Encoder for recording render bundle commands.
GpuRenderBundleEncoderDescriptor
Descriptor for creating a render bundle encoder.
GpuRenderPassEncoder
A render pass encoder for recording draw commands.
GpuRenderPassTimestampWrites
Timestamp writes for a render pass.
GpuRenderPipeline
A render pipeline.
GpuRenderPipelineDescriptor
Render pipeline descriptor.
GpuRequestAdapterOptions
Options for requesting an adapter.
GpuSampler
A texture sampler.
GpuSamplerBinding
Binds a sampler to a binding slot.
GpuSamplerBindingLayout
Sampler binding layout entry.
GpuSamplerDescriptor
Sampler descriptor for creating samplers with specific settings.
GpuShaderModule
A compiled shader module.
GpuShaderStage
Shader stage flag constants.
GpuStencilFaceState
Stencil face state.
GpuStorageTextureBindingLayout
Storage texture binding layout entry.
GpuTexture
A GPU texture.
GpuTextureBindingLayout
Texture binding layout entry.
GpuTextureUsage
Texture usage flag constants.
GpuTextureView
A view into a texture.
GpuTextureViewBinding
Binds a texture view to a binding slot.
GpuValidationError
A validation error.
GpuVertexAttribute
A vertex attribute in a vertex buffer layout.
GpuVertexBufferLayout
A vertex buffer layout.
Uint8List
A fixed-length list of 8-bit unsigned integers.
Wgpu
A wgpu instance — entry point for GPU access.
WgpuAdapter
A GPU adapter - represents a physical GPU.
WgpuAdapterInfo
Extended adapter info with wgpu-specific fields.
WgpuBackend
GPU backend selection for WgpuInstanceDescriptor.
WgpuBindGroup
A bind group that binds resources to shader bindings.
WgpuBindGroupLayout
A bind group layout that describes bindings.
WgpuBuffer
A GPU buffer for storing vertex, index, uniform, or storage data.
WgpuCommandBuffer
A recorded command buffer ready for submission.
WgpuCommandEncoder
A command encoder for recording GPU commands.
WgpuComputePassEncoder
A compute pass encoder for recording compute dispatch commands.
WgpuComputePipeline
A compute pipeline.
WgpuDevice
A logical GPU device for creating resources.
WgpuDeviceDescriptor
Device descriptor with wgpu extensions.
WgpuFence
Handle for tracking GPU work completion.
WgpuInstanceDescriptor
Configuration for creating a wgpu instance.
WgpuNativeResource
Base class for GPU resources backed by a native handle with automatic cleanup via NativeFinalizer.
WgpuPipelineLayout
A pipeline layout that groups bind group layouts.
WgpuQuerySet
A set of GPU timestamp queries for profiling.
WgpuQueue
Command queue for submitting GPU work.
WgpuRenderBundle
A pre-recorded bundle of render commands.
WgpuRenderBundleEncoder
Encoder for recording render bundle commands.
WgpuRenderPassEncoder
A render pass encoder for recording draw commands.
WgpuRenderPipeline
A render pipeline.
WgpuResource
Base interface for GPU resources that require explicit cleanup.
WgpuSampler
A texture sampler.
WgpuShaderModule
A compiled shader module.
WgpuSurface
A render surface for Flutter display.
WgpuTexture
A GPU texture.
WgpuTextureController
Controller for wgpu-backed Flutter textures.
WgpuTextureView
A view into a texture.
WgpuTextureViewArrayBinding
Bind group entry for an array of texture views (wgpu extension, not WebGPU spec).
WgpuTextureWidget
Widget that displays a wgpu-rendered texture.

Enums

GpuAddressMode
Address mode for texture sampling.
GpuBlendFactor
Blend factors.
GpuBlendOperation
Blend operations.
GpuBufferBindingType
Buffer binding types.
GpuBufferMapState
Buffer map state.
GpuCompareFunction
Comparison function for depth/stencil tests and samplers.
GpuCompilationMessageType
Compilation message severity.
GpuCullMode
Face culling mode.
GpuDeviceLostReason
Reason for device loss.
GpuErrorFilter
Error filter for error scopes.
GpuFeatureName
GPU feature names.
GpuFilterMode
Filter mode for texture sampling.
GpuFrontFace
Front face winding order.
GpuIndexFormat
Index format.
GpuLoadOp
Load operation for attachments.
GpuMipmapFilterMode
Mipmap filter mode.
GpuPowerPreference
Power preference when requesting an adapter.
GpuPrimitiveTopology
Primitive topology.
GpuQueryType
Query set types.
GpuSamplerBindingType
Sampler binding types.
GpuStencilOperation
Stencil operations.
GpuStorageTextureAccess
Storage texture access modes.
GpuStoreOp
Store operation for attachments.
GpuTextureAspect
Texture aspect.
GpuTextureDimension
Texture dimension.
GpuTextureFormat
Texture formats.
GpuTextureSampleType
Texture sample types.
GpuTextureViewDimension
Texture view dimension.
GpuVertexFormat
Vertex formats.
GpuVertexStepMode
Vertex step modes.
GpuWgslLanguageFeatureName
WGSL language feature names.
WgpuAdapterType
Adapter type (wgpu extension).
WgpuBackendType
Graphics backend type (wgpu extension).

Extension Types

GpuBufferUsageFlags
Buffer usage flags.
GpuMapModeFlags
Map mode flags.
GpuShaderStageFlags
Shader stage visibility flags.
GpuTextureUsageFlags
Texture usage flags.

Extensions

WgpuCommandEncoderTimestamp on GpuCommandEncoder
wgpu extension: writeTimestamp on command encoder.
WgpuComputePassImmediates on GpuComputePassEncoder
wgpu extension: immediates (push constants) on compute pass.
WgpuRenderBundleEncoderImmediates on GpuRenderBundleEncoder
wgpu extension: immediates (push constants) on render bundle encoder.
WgpuRenderPassImmediates on GpuRenderPassEncoder
wgpu extension: immediates (push constants) on render pass.
WgpuRenderPassMultiDraw on GpuRenderPassEncoder
wgpu extension: multi-draw on render pass encoder.

Functions

featuresFromBitmask(int bits) Set<GpuFeatureName>
Convert a GpuFeatureName bitmask from FFI to a Dart Set.
featuresToBitmask(Set<GpuFeatureName> features) int
Convert a Dart Set of GpuFeatureName to a bitmask for FFI.
limitsFromFfi(WGPUDeviceLimits n) GpuLimits
Convert a WGPUDeviceLimits FFI struct to a GpuLimits object.
limitsToFfi(Pointer<WGPUDeviceLimits> ptr, GpuLimits limits) → void
Write a GpuLimits object to an FFI WGPUDeviceLimits struct.