[−][src]Module nannou::wgpu
Items related to wgpu and its integration in nannou!
WebGPU is the portable graphics specification that nannou targets allowing us to write code that is both fast and allows us to target a wide range of platforms. wgpu is the name of the crate we use that implements this specification.
This module re-exports the entire wgpu
crate along with all of its documentation while also
adding some additional items that makes wgpu
easier to use alongside nannou.
Useful links:
- An awesome guide for wgpu-rs. Highly recommended reading if you would like to work more closely with the GPU in nannou!
- The wgpu-rs repository.
- The WebGPU specification.
- WebGPU on wikipedia.
Modules
blend | A set of useful descriptors for blending colours! |
Structs
ActiveAdapter | A single active adapter and its map of connected devices. |
Adapter | A handle to a physical graphics and/or compute device. |
AdapterInfo | Metadata about a backend adapter. |
AdapterMap | A map from |
AdapterMapKey | The key into the adapter map. |
BackendBit | |
BindGroup | An opaque handle to a binding group. |
BindGroupBuilder | Simplified creation of a bind group. |
BindGroupDescriptor | A description of a group of bindings and the resources to be bound. |
BindGroupLayout | An opaque handle to a binding group layout. |
BindGroupLayoutBinding | A description of a single binding inside a bind group. |
BindGroupLayoutBuilder | A type aimed at simplifying the creation of a bind group layout. |
BindGroupLayoutDescriptor | |
Binding | A bindable resource and the slot to bind it to. |
BlendDescriptor | |
Buffer | A handle to a GPU-accessible buffer. |
BufferAsyncMapping | |
BufferBytes | A wrapper around a |
BufferCopyView | A view of a buffer which can be used to copy to or from a texture. |
BufferDescriptor | |
BufferImage | A wrapper around a wgpu buffer that contains an image of a known size and |
BufferUsage | |
Color | |
ColorStateDescriptor | |
ColorWrite | |
CommandBuffer | An opaque handle to a command buffer on the GPU. |
CommandBufferDescriptor | |
CommandEncoder | An object that encodes GPU operations. |
CommandEncoderDescriptor | |
ComputePass | An in-progress recording of a compute pass. |
ComputePipeline | A handle to a compute pipeline. |
ComputePipelineDescriptor | A complete description of a compute pipeline. |
CreateBufferMapped | A buffer being created, mapped in host memory. |
DepthStencilStateDescriptor | |
Device | An open connection to a graphics and/or compute device. |
DeviceDescriptor | |
DeviceMap | A map of actively connected devices for an adapter. |
DeviceMapKey | The key into the device map. |
DeviceQueuePair | A handle to a connected logical device and its associated queue. |
Extensions | |
Extent3d | |
ImageAsyncMapping | A wrapper around a slice of bytes representing an image. |
Limits | |
Origin3d | |
PipelineLayout | An opaque handle to a pipeline layout. |
PipelineLayoutDescriptor | A description of a pipeline layout. |
ProgrammableStageDescriptor | A description of a programmable pipeline stage. |
Queue | A handle to a command queue on a device. |
RasterizationStateDescriptor | |
RenderPass | An in-progress recording of a render pass. |
RenderPassBuilder | A builder type to simplify the process of creating a render pass descriptor. |
RenderPassColorAttachmentDescriptor | A description of a color attachment. |
RenderPassColorAttachmentDescriptorBuilder | A builder type to simplify the process of creating a render pass descriptor. |
RenderPassDepthStencilAttachmentDescriptor | |
RenderPassDescriptor | A description of all the attachments of a render pass. |
RenderPipeline | A handle to a rendering (graphics) pipeline. |
RenderPipelineBuilder | A builder type to help simplify the construction of a RenderPipeline. |
RenderPipelineDescriptor | A complete description of a render (graphics) pipeline. |
RequestAdapterOptions | |
Rgba8AsyncMapping | A wrapper around a slice of bytes representing a non-linear sRGBA image. |
Sampler | A handle to a sampler. |
SamplerBuilder | Simplifies the construction of a |
SamplerDescriptor | |
ShaderModule | A handle to a compiled shader module. |
ShaderModuleDescriptor | |
ShaderStage | |
StencilStateFaceDescriptor | |
Surface | A handle to a presentable surface. |
SwapChain | A handle to a swap chain. |
SwapChainDescriptor | |
SwapChainOutput | A swap chain image that can be rendered to. |
Texture | A convenient wrapper around a handle to a texture on the GPU along with its descriptor. |
TextureBuilder | A type aimed at simplifying the construction of a Texture. |
TextureCapturer | A type dedicated to capturing a texture as a non-linear sRGBA image that can be read on the CPU. |
TextureCopyView | A view of a texture which can be used to copy to or from a buffer or another texture. |
TextureDescriptor | |
TextureHandle | A handle to a texture on the GPU. |
TextureId | A unique identifier associated with a Texture. |
TextureReshaper | Reshapes a texture from its original size, sample_count and format to the destination size, sample_count and format. |
TextureSnapshot | A snapshot captured by a Capturer. |
TextureUsage | |
TextureView | A convenient wrapper around a handle to a texture view along with its descriptor. |
TextureViewDescriptor | |
TextureViewHandle | A handle to a texture view. |
TextureViewId | A unique identifier associated with a TextureView. |
VertexAttributeDescriptor | |
VertexBufferDescriptor | A description of a vertex buffer. |
Enums
Constants
DEFAULT_ADAPTER_REQUEST_OPTIONS | The default set of options used to request a |
DEFAULT_EXTENSIONS | The default set of |
Traits
ToTextureView | Types that can produce a texture view. |
VertexDescriptor | A trait required to be implemented by vertices to provide a simpler render pipeline API. |
Functions
clear_texture | Adds a simple render pass command to the given encoder that simply clears the given texture with the given colour. |
create_pipeline_layout | Shorthand for creating the pipeline layout from a slice of bind group layouts. |
default_device_descriptor | The default device descriptor used to instantiate a logical device when creating windows. |
extent_3d_eq | Returns |
read_spirv | Safely read SPIR-V |
resolve_texture | Adds a simple render pass command to the given encoder that resolves the given multisampled
|
sampler_descriptor_clone | TODO: Remove this once |
sampler_descriptor_partial_eq | TODO: Remove this once |
shader_from_spirv_bytes | |
texture_descriptor_eq | Returns |
texture_format_from_image_color_type | Convert the given color type from the |
texture_format_size_bytes | Return the size of the given texture format in bytes. |
Type Definitions
BufferAddress | |
BufferMapAsyncResult | |
ShaderLocation |