Struct mallumo_gls::buffer::MutableBuffer
[−]
[src]
pub struct MutableBuffer { /* fields omitted */ }
Methods
impl MutableBuffer
[src]
fn new<T>(data: &[T]) -> Result<MutableBuffer, Error>
Creates new buffer and copies data
to its memory on GPU
Errors
- GL_OUT_OF_MEMORY - if the buffer cannot be created
fn new_empty(size: usize) -> Result<MutableBuffer, Error>
Creates new empty buffer
Errors
- BufferCreationError(GL_OUT_OF_MEMORY) - if the buffer cannot be created
fn set_sub_data<T>(&mut self, data: &[T], offset: isize) -> Result<(), Error>
Replaces part of memory with data
Errors
- BufferSetSubDataError(GL_INVALID_VALUE) - if size of
data
+ offset > buffer size