Struct glium::index::IndexBufferSlice [] [src]

pub struct IndexBufferSlice<'a, T: 'a> where T: Index {
    // some fields omitted
}

Slice of an IndexBuffer.

Methods

impl<'a, T: 'a> IndexBufferSlice<'a, T> where T: Index

fn get_primitives_type(&self) -> PrimitiveType

Returns the type of primitives associated with this index buffer.

fn get_indices_type(&self) -> IndexType

Returns the data type of the indices inside this index buffer.

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

Returns None if out of range.

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 IndexBufferSlice<'a, T> where T: Index

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

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

impl<'a, T> DerefMut for IndexBufferSlice<'a, T> where T: Index

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

Derived Implementations

impl<'a, T: Debug + 'a> Debug for IndexBufferSlice<'a, T> where T: Index, T: Debug

fn fmt(&self, __arg_0: &mut Formatter) -> Result