[−][src]Struct vulkano::buffer::BufferUsage
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: 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
device_address: bool
Requires the buffer_device_address
feature. If that feature is not enabled, this will
be silently ignored.
Implementations
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.
pub fn device_address() -> BufferUsage
[src]
Builds a BufferUsage
with device_address
set to true and the rest to false.
Trait Implementations
impl BitOr<BufferUsage> for BufferUsage
[src]
type Output = Self
The resulting type after applying the |
operator.
pub fn bitor(self, rhs: Self) -> Self
[src]
impl Clone for BufferUsage
[src]
pub fn clone(&self) -> BufferUsage
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for BufferUsage
[src]
impl Debug for BufferUsage
[src]
impl Eq for BufferUsage
[src]
impl PartialEq<BufferUsage> for BufferUsage
[src]
pub fn eq(&self, other: &BufferUsage) -> bool
[src]
pub fn ne(&self, other: &BufferUsage) -> bool
[src]
impl StructuralEq for BufferUsage
[src]
impl StructuralPartialEq for BufferUsage
[src]
Auto Trait Implementations
impl RefUnwindSafe for BufferUsage
[src]
impl Send for BufferUsage
[src]
impl Sync for BufferUsage
[src]
impl Unpin for BufferUsage
[src]
impl UnwindSafe for BufferUsage
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Content for T
[src]
pub fn ref_from_ptr(*mut c_void, usize) -> Option<*mut T>
[src]
pub fn is_size_suitable(usize) -> bool
[src]
pub fn indiv_size() -> usize
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,