Module wgpu.api
An idiomatic D wrapper for wgpu-native.
Functions
Name | Description |
---|---|
bufferPair(buffer, offset)
|
Creates a tuple that describes a vertex buffer and an offset in bytes into that buffer. |
Classes
Name | Description |
---|---|
Buffer
|
A handle to a GPU-accessible buffer. |
ColorTargetState
|
Describes the color state of a render pipeline. |
Device
|
An open connection to a graphics and/or compute device. |
FragmentState
|
Describes the fragment process in a render pipeline. |
Instance
|
Context for all other wgpu objects. Instance of wgpu. |
RenderPipeline
|
A handle to a rendering (graphics) pipeline. |
SwapChain
|
A handle to a swap chain. |
Texture
|
A handle to a texture on the GPU. |
Structs
Name | Description |
---|---|
Adapter
|
A handle to a physical graphics and/or compute device. |
BindGroup
|
An opaque handle to a binding group. |
BindGroupLayout
|
An opaque handle to a binding group layout. |
CommandBuffer
|
An opaque handle to a command buffer on the GPU. |
CommandEncoder
|
An object that encodes GPU operations. |
ComputePass
|
An in-progress recording of a compute pass. |
ComputePipeline
|
A handle to a compute pipeline. |
DepthStencilState
|
Describes the depth/stencil state in a render pipeline. |
MultisampleState
|
Describes the multi-sampling state of a render pipeline. |
PipelineLayout
|
An opaque handle to a pipeline layout describing the available binding groups of a pipeline. |
PrimitiveState
|
Describes the state of primitive assembly and rasterization in a render pipeline. |
Queue
|
A Queue executes finished CommandBuffer objects.
|
RenderPass
|
An in-progress recording of a render pass. |
Sampler
|
A handle to a sampler. |
ShaderModule
|
A handle to a compiled shader module on the GPU. |
Surface
|
A handle to a presentable surface. |
TextureView
|
A handle to a texture view. |
VertexBufferLayout
|
Describes how the vertex buffer is interpreted. |
VertexState
|
Describes the vertex process in a render pipeline. |
Global variables
Name | Type | Description |
---|---|---|
BIND_BUFFER_ALIGNMENT
|
const(uint)
|
Bound uniform/storage buffer offsets must be aligned to this number. |
COPY_BUFFER_ALIGNMENT
|
const(uint)
|
Buffer-to-buffer copy, buffer clear offsets, and sizes must be aligned to this number. |
COPY_BYTES_PER_ROW_ALIGNMENT
|
const(uint)
|
Buffer-Texture copies must have TextureDataLayout aligned to this number.
|
MAX_ANISOTROPY
|
const(uint)
|
Maximum anisotropy. |
MAX_COLOR_TARGETS
|
const(uint)
|
Maximum number of color targets. |
MAX_MIP_LEVELS
|
const(uint)
|
Maximum amount of mipmap levels. |
MAX_VERTEX_BUFFERS
|
const(uint)
|
Maximum number of vertex buffers. |
QUERY_SIZE
|
const(uint)
|
Size of a single occlusion/timestamp query, when copied into a buffer, in bytes. |
VERSION
|
const(string)
|
Version of wgpu-native this library binds. |
Aliases
Name | Type | Description |
---|---|---|
AdapterProperties
|
__C
|
|
BindGroupDescriptor
|
__C
|
Describes a BindGroup .
|
BindGroupEntry
|
__C
|
|
BindGroupLayoutDescriptor
|
__C
|
Describes a BindGroupLayout .
|
BindGroupLayoutEntry
|
__C
|
Describes a single binding inside a bind group. |
BlendComponent
|
__C
|
|
BlendState
|
__C
|
|
BufferBindingLayout
|
__C
|
|
BufferDescriptor
|
__C
|
Describes a Buffer .
|
BufferPair
|
std
|
Describes a vertex buffer and an offset in bytes into that buffer. |
ChainedStruct
|
__C
|
|
ChainedStructOut
|
__C
|
|
Color
|
__C
|
RGBA double precision color. |
CommandBufferDescriptor
|
__C
|
Describes a CommandBuffer .
|
CommandEncoderDescriptor
|
__C
|
Describes a CommandEncoder .
|
CompilationInfo
|
__C
|
|
CompilationMessage
|
__C
|
|
ComputePassDescriptor
|
__C
|
Describes a ComputePass .
|
ComputePassTimestampWrite
|
__C
|
|
ComputePipelineDescriptor
|
__C
|
Describes a ComputePipeline .
|
ConstantEntry
|
__C
|
|
Extent3d
|
__C
|
Extent of a texture related operation. |
ImageCopyBuffer
|
__C
|
View of a texture which can be used to copy to/from a buffer. |
ImageCopyTexture
|
__C
|
View of a texture which can be used to copy to/from a texture. |
InstanceDescriptor
|
__C
|
|
Limits
|
__C
|
Represents the sets of limits an adapter/device supports. |
Origin3d
|
__C
|
Origin of a copy to/from a texture. |
PipelineLayoutDescriptor
|
__C
|
Describes a PipelineLayout .
|
PrimitiveDepthClipControl
|
__C
|
|
ProgrammableStageDescriptor
|
__C
|
|
QuerySetDescriptor
|
__C
|
|
QueueDescriptor
|
__C
|
|
RenderBundleDescriptor
|
__C
|
|
RenderBundleEncoderDescriptor
|
__C
|
|
RenderPassColorAttachment
|
__C
|
Describes a color attachment to a RenderPass .
|
RenderPassDepthStencilAttachment
|
__C
|
Describes a depth stencil attachment to a RenderPass .
|
RenderPassDescriptor
|
__C
|
Describes the attachments of a RenderPass .
|
RenderPassDescriptorMaxDrawCount
|
__C
|
|
RenderPassTimestampWrite
|
__C
|
|
RenderPipelineDescriptor
|
__C
|
Describes a RenderPipeline .
|
RequestAdapterOptions
|
__C
|
Additional information required when requesting an adapter. |
SamplerBindingLayout
|
__C
|
|
SamplerDescriptor
|
__C
|
Describes a Sampler .
|
ShaderModuleCompilationHint
|
__C
|
|
ShaderModuleDescriptor
|
__C
|
|
ShaderModuleSpirvDescriptor
|
__C
|
|
ShaderModuleWgslDescriptor
|
__C
|
|
StencilFaceState
|
__C
|
|
StorageTextureBindingLayout
|
__C
|
|
SurfaceDescriptor
|
__C
|
|
SurfaceDescriptorFromAndroidNativeWindow
|
__C
|
|
SurfaceDescriptorFromCanvasHtmlSelector
|
__C
|
|
SurfaceDescriptorFromMetalLayer
|
__C
|
|
SurfaceDescriptorFromWaylandSurface
|
__C
|
|
SurfaceDescriptorFromWindowsHwnd
|
__C
|
|
SurfaceDescriptorFromXcbWindow
|
__C
|
|
SurfaceDescriptorFromXlibWindow
|
__C
|
|
SwapChainDescriptor
|
__C
|
Describes a SwapChain .
|
TextureBindingLayout
|
__C
|
|
TextureDataLayout
|
__C
|
Layout of a texture in a buffer's memory. |
TextureDescriptor
|
__C
|
Describes a Texture .
|
TextureViewDescriptor
|
__C
|
Describes a TextureView .
|
VertexAttribute
|
__C
|