pub struct BufferView<B> where
B: BufferAccess + ?Sized, { /* private fields */ }
Expand description
Represents a way for the GPU to interpret buffer data. See the documentation of the
view
module.
Implementations
pub fn new<Px>(
buffer: Arc<B>,
format: Format
) -> Result<Arc<BufferView<B>>, BufferViewCreationError> where
B: TypedBufferAccess<Content = [Px]>,
Px: Pixel,
pub fn new<Px>(
buffer: Arc<B>,
format: Format
) -> Result<Arc<BufferView<B>>, BufferViewCreationError> where
B: TypedBufferAccess<Content = [Px]>,
Px: Pixel,
Builds a new buffer view.
pub unsafe fn unchecked(
org_buffer: Arc<B>,
format: Format
) -> Result<Arc<BufferView<B>>, BufferViewCreationError> where
B: BufferAccess,
pub unsafe fn unchecked(
org_buffer: Arc<B>,
format: Format
) -> Result<Arc<BufferView<B>>, BufferViewCreationError> where
B: BufferAccess,
Builds a new buffer view without checking that the format is correct.
Trait Implementations
Returns the wrapped buffer that this buffer view was created from.
Returns the features supported by the buffer view’s format.
type Object = BufferView
type Object = BufferView
The type of the object.
Returns a reference to the object.
Auto Trait Implementations
impl<B: ?Sized> RefUnwindSafe for BufferView<B> where
B: RefUnwindSafe,
impl<B: ?Sized> Send for BufferView<B>
impl<B: ?Sized> Sync for BufferView<B>
impl<B: ?Sized> Unpin for BufferView<B>
impl<B: ?Sized> UnwindSafe for BufferView<B> where
B: RefUnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Builds a pointer to this type from a raw pointer.
Returns true if the size is suitable to store a type like this.
Returns the size of an individual element.