Struct mallumo_gls::buffer::MutableBuffer
[−]
[src]
pub struct MutableBuffer { /* fields omitted */ }
Methods
impl MutableBuffer
[src]
fn new<T>(data: &[T]) -> Result<MutableBuffer, Error>
[src]
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>
[src]
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>
[src]
Replaces part of memory with data
Errors
- BufferSetSubDataError(GL_INVALID_VALUE) - if size of
data
+ offset > buffer size
fn clear_data(&mut self) -> Result<(), Error>
[src]
fn clear_sub_data(&mut self, size: usize, offset: usize) -> Result<(), Error>
[src]
fn copy_to(
&mut self,
other: &mut MutableBuffer,
read_offset: usize,
write_offset: usize,
size: usize
) -> Result<(), Error>
[src]
&mut self,
other: &mut MutableBuffer,
read_offset: usize,
write_offset: usize,
size: usize
) -> Result<(), Error>