pub struct State { /* private fields */ }

Implementations

Tries to create a new State from a StateBuilder

returns either the newly created state or an error if requesting an adapter or device fails.

Creates a new pipeline layout from its bind group layouts and its push constant ranges

Helper method to create a pipeline from its builder

Creates a shader module from its src

Returns whether the resizing succeeded or not

Initiates the rendering process, the passed callback gets called once all the required state is set up and once it ran, all the required steps to proceed get executed

Helper method to create a render pass in the encoder

Returns the size defined in the config

Returns the format defined in the config

Tries to update the present mode of the surface. Returns whether update succeeded or not

Updates the present mode of the surface Note: this function will wait until the render call has finished

Returns a reference to the device

Returns a reference to the queue

Returns a reference to the surface

Returns a reference to the adapter which can be used to acquire information

Helper method to create a buffer from its content and usage

Helper method to create a texture from its builder

Helper method to create a BindGroupLayoutEntry from its entries

Helper method to create a BindGroup from its layout and entries

Helper method to write data to a buffer at a specific offset

Helper method to create a depth texture from its format

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.