Struct gfx::device::draw::DataBuffer
[−]
[src]
pub struct DataBuffer { // some fields omitted }
A buffer of data accompanying the commands. It can be vertex data, texture updates, uniform blocks, or even some draw states.
Methods
impl DataBuffer
fn new() -> DataBuffer
Create a fresh new data buffer.
fn clear(&mut self)
Clear all the data but retain the allocated storage.
fn add_struct<T: Copy>(&mut self, v: &T) -> DataPointer
Copy a given structure into the buffer, return the offset and the size.
fn add_vec<T: Copy>(&mut self, v: &[T]) -> DataPointer
Copy a given vector slice into the buffer
fn get_ref(&self, data: DataPointer) -> &[u8]
Return a reference to a stored data object.