Struct wgpu_util::DynamicBuffer[][src]

pub struct DynamicBuffer { /* fields omitted */ }
Expand description

A wgpu::Buffer which dynamically grows based on the contents.

Implementations

Create a new empty buffer.

Create a new buffer with contents.

Uploads contents and resizes the buffer if needed.

If contents fits, uploads using wgpu::Queue, otherwise reallocates and uploads using wgpu::Device.

Uploades data using wgpu::Queue without resizing. Fails if data doesn’t fit in buffers and returns the size difference.

Allocates a new buffer, replaces the old one and uploades the contents using wgpu::Device.

Get a reference to the raw buffer.

Convert into raw buffer.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.