Module wgpu.api

An idiomatic D wrapper for wgpu-native.

Functions

NameDescription
bufferPair(buffer, offset) Creates a tuple that describes a vertex buffer and an offset in bytes into that buffer.

Classes

NameDescription
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

NameDescription
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

NameTypeDescription
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.bytesPerRow 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

NameTypeDescription
AdapterProperties __C.WGPUAdapterProperties
BindGroupDescriptor __C.WGPUBindGroupDescriptor Describes a BindGroup.
BindGroupEntry __C.WGPUBindGroupEntry
BindGroupLayoutDescriptor __C.WGPUBindGroupLayoutDescriptor Describes a BindGroupLayout.
BindGroupLayoutEntry __C.WGPUBindGroupLayoutEntry Describes a single binding inside a bind group.
BlendComponent __C.WGPUBlendComponent
BlendState __C.WGPUBlendState
BufferBindingLayout __C.WGPUBufferBindingLayout
BufferDescriptor __C.WGPUBufferDescriptor Describes a Buffer.
BufferPair std.typecons.Tuple!(wgpu.api.Buffer,uint) Describes a vertex buffer and an offset in bytes into that buffer.
ChainedStruct __C.WGPUChainedStruct
ChainedStructOut __C.WGPUChainedStructOut
Color __C.WGPUColor RGBA double precision color.
CommandBufferDescriptor __C.WGPUCommandBufferDescriptor Describes a CommandBuffer.
CommandEncoderDescriptor __C.WGPUCommandEncoderDescriptor Describes a CommandEncoder.
CompilationInfo __C.WGPUCompilationInfo
CompilationMessage __C.WGPUCompilationMessage
ComputePassDescriptor __C.WGPUComputePassDescriptor Describes a ComputePass.
ComputePassTimestampWrite __C.WGPUComputePassTimestampWrite
ComputePipelineDescriptor __C.WGPUComputePipelineDescriptor Describes a ComputePipeline.
ConstantEntry __C.WGPUConstantEntry
Extent3d __C.WGPUExtent3D Extent of a texture related operation.
ImageCopyBuffer __C.WGPUImageCopyBuffer View of a texture which can be used to copy to/from a buffer.
ImageCopyTexture __C.WGPUImageCopyTexture View of a texture which can be used to copy to/from a texture.
InstanceDescriptor __C.WGPUInstanceDescriptor
Limits __C.WGPULimits Represents the sets of limits an adapter/device supports.
Origin3d __C.WGPUOrigin3D Origin of a copy to/from a texture.
PipelineLayoutDescriptor __C.WGPUPipelineLayoutDescriptor Describes a PipelineLayout.
PrimitiveDepthClipControl __C.WGPUPrimitiveDepthClipControl
ProgrammableStageDescriptor __C.WGPUProgrammableStageDescriptor
QuerySetDescriptor __C.WGPUQuerySetDescriptor
QueueDescriptor __C.WGPUQueueDescriptor
RenderBundleDescriptor __C.WGPURenderBundleDescriptor
RenderBundleEncoderDescriptor __C.WGPURenderBundleEncoderDescriptor
RenderPassColorAttachment __C.WGPURenderPassColorAttachment Describes a color attachment to a RenderPass.
RenderPassDepthStencilAttachment __C.WGPURenderPassDepthStencilAttachment Describes a depth stencil attachment to a RenderPass.
RenderPassDescriptor __C.WGPURenderPassDescriptor Describes the attachments of a RenderPass.
RenderPassDescriptorMaxDrawCount __C.WGPURenderPassDescriptorMaxDrawCount
RenderPassTimestampWrite __C.WGPURenderPassTimestampWrite
RenderPipelineDescriptor __C.WGPURenderPipelineDescriptor Describes a RenderPipeline.
RequestAdapterOptions __C.WGPURequestAdapterOptions Additional information required when requesting an adapter.
SamplerBindingLayout __C.WGPUSamplerBindingLayout
SamplerDescriptor __C.WGPUSamplerDescriptor Describes a Sampler.
ShaderModuleCompilationHint __C.WGPUShaderModuleCompilationHint
ShaderModuleDescriptor __C.WGPUShaderModuleDescriptor
ShaderModuleSpirvDescriptor __C.WGPUShaderModuleSPIRVDescriptor
ShaderModuleWgslDescriptor __C.WGPUShaderModuleWGSLDescriptor
StencilFaceState __C.WGPUStencilFaceState
StorageTextureBindingLayout __C.WGPUStorageTextureBindingLayout
SurfaceDescriptor __C.WGPUSurfaceDescriptor
SurfaceDescriptorFromAndroidNativeWindow __C.WGPUSurfaceDescriptorFromAndroidNativeWindow
SurfaceDescriptorFromCanvasHtmlSelector __C.WGPUSurfaceDescriptorFromCanvasHTMLSelector
SurfaceDescriptorFromMetalLayer __C.WGPUSurfaceDescriptorFromMetalLayer
SurfaceDescriptorFromWaylandSurface __C.WGPUSurfaceDescriptorFromWaylandSurface
SurfaceDescriptorFromWindowsHwnd __C.WGPUSurfaceDescriptorFromWindowsHWND
SurfaceDescriptorFromXcbWindow __C.WGPUSurfaceDescriptorFromXcbWindow
SurfaceDescriptorFromXlibWindow __C.WGPUSurfaceDescriptorFromXlibWindow
SwapChainDescriptor __C.WGPUSwapChainDescriptor Describes a SwapChain.
TextureBindingLayout __C.WGPUTextureBindingLayout
TextureDataLayout __C.WGPUTextureDataLayout Layout of a texture in a buffer's memory.
TextureDescriptor __C.WGPUTextureDescriptor Describes a Texture.
TextureViewDescriptor __C.WGPUTextureViewDescriptor Describes a TextureView.
VertexAttribute __C.WGPUVertexAttribute