[][src]Struct mallumo_gls::buffer::MappedMutableBuffer

pub struct MappedMutableBuffer { /* fields omitted */ }

Methods

impl MappedMutableBuffer[src]

pub fn new<T>(data: &[T]) -> Result<MappedMutableBuffer, Error>[src]

Creates new buffer and copies data to its memory on GPU

Errors

  • GL_OUT_OF_MEMORY - if the buffer cannot be created

pub fn new_empty(size: usize) -> Result<MappedMutableBuffer, Error>[src]

Creates new empty buffer

Errors

  • BufferCreationError(GL_OUT_OF_MEMORY) - if the buffer cannot be created

pub unsafe fn get_pointer(
    &self,
    length: usize,
    offset: usize
) -> Result<*mut c_void, Error>
[src]

Trait Implementations

impl Buffer for MappedMutableBuffer[src]

fn bind_base(&self, target: BufferBaseTarget, index: usize) -> Result<(), Error>[src]

fn bind_range(
    &self,
    target: BufferBaseTarget,
    index: usize,
    offset: usize,
    size: usize
) -> Result<(), Error>
[src]

fn bind_as_indirect(&self) -> Result<(), Error>[src]

impl Drop for MappedMutableBuffer[src]

impl Debug for MappedMutableBuffer[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.