Struct vulkano::buffer::view::BufferView[][src]

pub struct BufferView<B> where
    B: BufferAccess
{ /* fields omitted */ }

Represents a way for the GPU to interpret buffer data. See the documentation of the view module.

Implementations

impl<B> BufferView<B> where
    B: BufferAccess
[src]

pub fn new<Px>(
    buffer: B,
    format: Format
) -> Result<BufferView<B>, BufferViewCreationError> where
    B: TypedBufferAccess<Content = [Px]>,
    Px: Pixel
[src]

Builds a new buffer view.

pub unsafe fn unchecked(
    org_buffer: B,
    format: Format
) -> Result<BufferView<B>, BufferViewCreationError> where
    B: BufferAccess
[src]

Builds a new buffer view without checking that the format is correct.

pub fn buffer(&self) -> &B[src]

Returns the buffer associated to this view.

pub fn uniform_texel_buffer(&self) -> bool[src]

Returns true if the buffer view can be used as a uniform texel buffer.

pub fn storage_texel_buffer(&self) -> bool[src]

Returns true if the buffer view can be used as a storage texel buffer.

pub fn storage_texel_buffer_atomic(&self) -> bool[src]

Returns true if the buffer view can be used as a storage texel buffer with atomic accesses.

Trait Implementations

impl<B> BufferViewRef for BufferView<B> where
    B: BufferAccess
[src]

type BufferAccess = B

fn view(&self) -> &BufferView<B>[src]

impl<B> Debug for BufferView<B> where
    B: BufferAccess + Debug
[src]

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>[src]

Formats the value using the given formatter. Read more

impl<B> DeviceOwned for BufferView<B> where
    B: BufferAccess
[src]

fn device(&self) -> &Arc<Device>[src]

Returns the device that owns Self.

impl<B> Drop for BufferView<B> where
    B: BufferAccess
[src]

fn drop(&mut self)[src]

Executes the destructor for this type. Read more

impl<B> VulkanObject for BufferView<B> where
    B: BufferAccess
[src]

type Object = BufferView

The type of the object.

const TYPE: ObjectType[src]

The ObjectType of the internal Vulkan handle.

fn internal_object(&self) -> BufferView[src]

Returns a reference to the object.

Auto Trait Implementations

impl<B> RefUnwindSafe for BufferView<B> where
    B: RefUnwindSafe

impl<B> Send for BufferView<B> where
    B: Send

impl<B> Sync for BufferView<B> where
    B: Sync

impl<B> Unpin for BufferView<B> where
    B: Unpin

impl<B> UnwindSafe for BufferView<B> where
    B: UnwindSafe

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> Content for T[src]

pub fn ref_from_ptr(*mut c_void, usize) -> Option<*mut T>[src]

Builds a pointer to this type from a raw pointer.

pub fn is_size_suitable(usize) -> bool[src]

Returns true if the size is suitable to store a type like this.

pub fn indiv_size() -> usize[src]

Returns the size of an individual element.

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.