Skip to main content

buffer_mut

Function buffer_mut 

Source
pub fn buffer_mut<'a>(
    memory: &'a mut Memory,
    program: &Program,
    name: &str,
) -> Result<&'a mut Buffer, Error>
Expand description

Return a mutable buffer only when the program declares it writable.

§Errors

Returns Error::Interp if the buffer is read-only, uniform, or does not exist in the program declaration.