[][src]Struct vulkano::buffer::BufferUsage

pub struct BufferUsage {
    pub transfer_source: bool,
    pub transfer_destination: 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 just 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 BufferUsage structs for some common situations. However there is no restriction in the combination of BufferUsages that can be enabled.

Fields

transfer_source: booltransfer_destination: booluniform_texel_buffer: boolstorage_texel_buffer: booluniform_buffer: boolstorage_buffer: boolindex_buffer: boolvertex_buffer: boolindirect_buffer: bool

Methods

impl BufferUsage[src]

pub fn none() -> BufferUsage[src]

Builds a BufferUsage with all values set to false.

pub fn all() -> BufferUsage[src]

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

pub fn transfer_source() -> BufferUsage[src]

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

pub fn transfer_destination() -> BufferUsage[src]

Builds a BufferUsage with transfer_destination set to true and the rest to false.

pub fn vertex_buffer() -> BufferUsage[src]

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

pub fn vertex_buffer_transfer_destination() -> BufferUsage[src]

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

pub fn index_buffer() -> BufferUsage[src]

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

pub fn index_buffer_transfer_destination() -> BufferUsage[src]

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

pub fn uniform_buffer() -> BufferUsage[src]

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

pub fn uniform_buffer_transfer_destination() -> BufferUsage[src]

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

pub fn indirect_buffer() -> BufferUsage[src]

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

pub fn indirect_buffer_transfer_destination() -> BufferUsage[src]

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

Trait Implementations

impl Eq for BufferUsage[src]

impl Clone for BufferUsage[src]

impl PartialEq<BufferUsage> for BufferUsage[src]

impl Copy for BufferUsage[src]

impl BitOr<BufferUsage> for BufferUsage[src]

type Output = Self

The resulting type after applying the | operator.

impl Debug for BufferUsage[src]

Auto Trait Implementations

impl Send for BufferUsage

impl Unpin for BufferUsage

impl Sync for BufferUsage

impl UnwindSafe for BufferUsage

impl RefUnwindSafe for BufferUsage

Blanket Implementations

impl<T> Content for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]