Trait gbm::ReadableMappedBufferObject
[−]
[src]
pub trait ReadableMappedBufferObject<'a> { fn stride(&self) -> u32; fn x(&self) -> u32; fn y(&self) -> u32; fn height(&self) -> u32; fn width(&self) -> u32; fn buffer(&'a self) -> &'a [u8]; }
Common functionality for all mapped buffer objects
Required Methods
fn stride(&self) -> u32
Get the stride of the buffer object
This is calculated by the backend when it does the allocation of the buffer.
fn x(&self) -> u32
The X (top left origin) starting position of the mapped region for the buffer
fn y(&self) -> u32
The Y (top left origin) starting position of the mapped region for the buffer
fn height(&self) -> u32
The height of the mapped region for the buffer
fn width(&self) -> u32
The width of the mapped region for the buffer
fn buffer(&'a self) -> &'a [u8]
Access to the underlying image buffer
Implementors
impl<'a, T: 'static> ReadableMappedBufferObject<'a> for MappedBufferObject<'a, T>
impl<'a, T: 'static> ReadableMappedBufferObject<'a> for MappedBufferObjectRW<'a, T>