[−][src]Trait glium::buffer::Content
Trait for types of data that can be put inside buffers.
Associated Types
type Owned
A type that holds a sized version of the content.
Required methods
fn read<F, E>(size: usize, _: F) -> Result<Self::Owned, E> where
F: FnOnce(&mut Self) -> Result<(), E>,
F: FnOnce(&mut Self) -> Result<(), E>,
Prepares an output buffer, then turns this buffer into an Owned
.
fn get_elements_size() -> usize
Returns the size of each element.
fn to_void_ptr(&self) -> *const ()
Produces a pointer to the data.
fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut Self>
Builds a pointer to this type from a raw pointer.
fn is_size_suitable(_: usize) -> bool
Returns true if the size is suitable to store a type like this.
Implementations on Foreign Types
impl<T> Content for [T] where
T: Copy,
[src]
T: Copy,
type Owned = Vec<T>
fn read<F, E>(size: usize, f: F) -> Result<Vec<T>, E> where
F: FnOnce(&mut [T]) -> Result<(), E>,
[src]
F: FnOnce(&mut [T]) -> Result<(), E>,