Struct vulkano::buffer::view::BufferView
source · pub struct BufferView<F, B>where
B: BufferAccess,{ /* private fields */ }
Expand description
Represents a way for the GPU to interpret buffer data. See the documentation of the
view
module.
Implementations
sourceimpl<F, B> BufferView<F, B>where
B: BufferAccess,
impl<F, B> BufferView<F, B>where
B: BufferAccess,
sourcepub fn new(
buffer: B,
format: F
) -> Result<BufferView<F, B>, BufferViewCreationError>where
B: TypedBufferAccess<Content = [F::Pixel]>,
F: StrongStorage + 'static,
pub fn new(
buffer: B,
format: F
) -> Result<BufferView<F, B>, BufferViewCreationError>where
B: TypedBufferAccess<Content = [F::Pixel]>,
F: StrongStorage + 'static,
Builds a new buffer view.
sourcepub unsafe fn unchecked(
org_buffer: B,
format: F
) -> Result<BufferView<F, B>, BufferViewCreationError>where
B: BufferAccess,
F: FormatDesc + 'static,
pub unsafe fn unchecked(
org_buffer: B,
format: F
) -> Result<BufferView<F, B>, BufferViewCreationError>where
B: BufferAccess,
F: FormatDesc + 'static,
Builds a new buffer view without checking that the format is correct.
sourcepub fn uniform_texel_buffer(&self) -> bool
pub fn uniform_texel_buffer(&self) -> bool
Returns true if the buffer view can be used as a uniform texel buffer.
sourcepub fn storage_texel_buffer(&self) -> bool
pub fn storage_texel_buffer(&self) -> bool
Returns true if the buffer view can be used as a storage texel buffer.
sourcepub fn storage_texel_buffer_atomic(&self) -> bool
pub fn storage_texel_buffer_atomic(&self) -> bool
Returns true if the buffer view can be used as a storage texel buffer with atomic accesses.
Trait Implementations
sourceimpl<F, B> BufferViewRef for BufferView<F, B>where
B: BufferAccess,
impl<F, B> BufferViewRef for BufferView<F, B>where
B: BufferAccess,
sourceimpl<F, B> Debug for BufferView<F, B>where
B: BufferAccess + Debug,
impl<F, B> Debug for BufferView<F, B>where
B: BufferAccess + Debug,
sourceimpl<F, B> DeviceOwned for BufferView<F, B>where
B: BufferAccess,
impl<F, B> DeviceOwned for BufferView<F, B>where
B: BufferAccess,
sourceimpl<F, B> Drop for BufferView<F, B>where
B: BufferAccess,
impl<F, B> Drop for BufferView<F, B>where
B: BufferAccess,
sourceimpl<F, B> VulkanObject for BufferView<F, B>where
B: BufferAccess,
impl<F, B> VulkanObject for BufferView<F, B>where
B: BufferAccess,
sourceconst TYPE: DebugReportObjectTypeEXT = 13u32
const TYPE: DebugReportObjectTypeEXT = 13u32
The
DebugReportObjectTypeEXT
of the internal Vulkan handle.sourcefn internal_object(&self) -> BufferView
fn internal_object(&self) -> BufferView
Returns a reference to the object.
Auto Trait Implementations
impl<F, B> RefUnwindSafe for BufferView<F, B>where
B: RefUnwindSafe,
F: RefUnwindSafe,
impl<F, B> Send for BufferView<F, B>where
B: Send,
F: Send,
impl<F, B> Sync for BufferView<F, B>where
B: Sync,
F: Sync,
impl<F, B> Unpin for BufferView<F, B>where
B: Unpin,
F: Unpin,
impl<F, B> UnwindSafe for BufferView<F, B>where
B: UnwindSafe,
F: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Content for T
impl<T> Content for T
sourcefn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
Builds a pointer to this type from a raw pointer.
sourcefn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Returns true if the size is suitable to store a type like this.
sourcefn indiv_size() -> usize
fn indiv_size() -> usize
Returns the size of an individual element.