Struct vulkano::buffer::BufferUsage
[−]
[src]
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 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: bool
transfer_destination: bool
uniform_texel_buffer: bool
storage_texel_buffer: bool
uniform_buffer: bool
storage_buffer: bool
index_buffer: bool
vertex_buffer: bool
indirect_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 Debug for BufferUsage
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Copy for BufferUsage
[src]
impl Clone for BufferUsage
[src]
fn clone(&self) -> BufferUsage
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more