Struct glium::vertex::VertexBufferSlice [] [src]

pub struct VertexBufferSlice<'b, T: 'b> where T: Copy {
    // some fields omitted
}

Represents a slice of a VertexBuffer.

Methods from Deref<Target=BufferViewSlice<'a, [T]>>

fn get_size(&self) -> usize

Returns the size in bytes of this slice.

fn write(&self, data: &T)

Uploads some data in this buffer.

Panic

Panics if the length of data is different from the length of this buffer.

fn invalidate(&self)

Invalidates the content of the slice. The data becomes undefined.

This operation is a no-op if the backend doesn't support it.

fn read(&self) -> Result<T, ReadError>

Reads the content of the buffer.

fn as_slice_any(&self) -> BufferViewAnySlice<'a>

Builds a slice-any containing the whole subbuffer.

fn len(&self) -> usize

Returns the number of elements in this slice.

fn slice(&self, range: Range<usize>) -> Option<BufferViewSlice<'a, [T]>>

Builds a subslice of this slice. Returns None if out of range.

fn read_as_texture_1d<S>(&self) -> Result<S, ReadError> where S: Texture1dDataSink<T>

Reads the content of the buffer.

Trait Implementations

impl<'a, T> Deref for VertexBufferSlice<'a, T> where T: Copy

type Target = BufferViewSlice<'a, [T]>

fn deref(&self) -> &BufferViewSlice<'a, [T]>

impl<'a, T> DerefMut for VertexBufferSlice<'a, T> where T: Copy

fn deref_mut(&mut self) -> &mut BufferViewSlice<'a, [T]>

impl<'a, T> IntoVerticesSource<'a> for VertexBufferSlice<'a, T> where T: Copy

fn into_vertices_source(self) -> VerticesSource<'a>