Struct vulkano::buffer::sys::Usage [] [src]

pub struct Usage {
    pub transfer_source: bool,
    pub transfer_dest: bool,
    pub uniform_texel_buffer: bool,
    pub storage_texel_buffer: bool,
    pub uniform_buffer: bool,
    pub storage_buffer: bool,
    pub index_buffer: bool,
    pub vertex_buffer: bool,
    pub indirect_buffer: bool,
}

Describes how a buffer is going to be used. This is not an optimization.

If you try to use a buffer in a way that you didn't declare, a panic will happen.

Some methods are provided to build Usage structs for some common situations. However there is no restriction in the combination of usages that can be enabled.

Fields

Methods

impl Usage
[src]

Builds a Usage with all values set to false.

Builds a Usage with all values set to true. Can be used for quick prototyping.

Builds a Usage with transfer_source set to true and the rest to false.

Builds a Usage with transfer_dest set to true and the rest to false.

Builds a Usage with vertex_buffer set to true and the rest to false.

Builds a Usage with vertex_buffer and transfer_dest set to true and the rest to false.

Builds a Usage with index_buffer set to true and the rest to false.

Builds a Usage with index_buffer and transfer_dest set to true and the rest to false.

Builds a Usage with uniform_buffer set to true and the rest to false.

Builds a Usage with uniform_buffer and transfer_dest set to true and the rest to false.

Builds a Usage with indirect_buffer set to true and the rest to false.

Builds a Usage with indirect_buffer and transfer_dest set to true and the rest to false.

Trait Implementations

impl Debug for Usage
[src]

Formats the value using the given formatter.

impl Copy for Usage
[src]

impl Clone for Usage
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more