Struct solstice::buffer::Mapped [−][src]
Implementations
impl<T, D> Mapped<T, D> where
D: Dimension,
[src]
D: Dimension,
pub fn with_shape<S>(inner: T, shape: S) -> Self where
S: ShapeBuilder<Dim = D>,
[src]
S: ShapeBuilder<Dim = D>,
pub fn inner(&self) -> &T
[src]
pub fn memory_map(&self) -> &[u8]
[src]
impl<T> Mapped<T, Ix1>
[src]
pub fn from_vec(inner: T, vec: Vec<u8>) -> Self
[src]
pub fn write(&mut self, data: &[u8], offset: usize)
[src]
Write new data into the buffer and adjust it’s dirty range accordingly.
This function will panic if the buffer overflows.
pub fn modified_range(&self) -> Option<ModifiedRange<usize>>
[src]
impl Mapped<Buffer, Dim<[usize; 1]>>
[src]
pub fn with_buffer(
ctx: &mut Context,
size: usize,
buffer_type: BufferType,
usage: Usage
) -> Result<Self, GraphicsError>
[src]
ctx: &mut Context,
size: usize,
buffer_type: BufferType,
usage: Usage
) -> Result<Self, GraphicsError>
pub fn unmap(&mut self, ctx: &mut Context)
[src]
impl Mapped<Image, Dim<[usize; 2]>>
[src]
pub fn new(
ctx: &mut Context,
texture_type: TextureType,
format: PixelFormat,
width: u32,
height: u32,
settings: Settings
) -> Result<Self, GraphicsError>
[src]
ctx: &mut Context,
texture_type: TextureType,
format: PixelFormat,
width: u32,
height: u32,
settings: Settings
) -> Result<Self, GraphicsError>
pub fn with_data(
ctx: &mut Context,
texture_type: TextureType,
format: PixelFormat,
width: u32,
height: u32,
data: Vec<u8>,
settings: Settings
) -> Result<Self, GraphicsError>
[src]
ctx: &mut Context,
texture_type: TextureType,
format: PixelFormat,
width: u32,
height: u32,
data: Vec<u8>,
settings: Settings
) -> Result<Self, GraphicsError>
pub fn set_pixels(&mut self, region: Viewport<usize>, data: &[u8])
[src]
pub fn get_pixels(&self) -> &[u8]
[src]
pub fn get_pixel(&self, x: usize, y: usize) -> &[u8]
[src]
pub fn set_pixel(&mut self, x: usize, y: usize, pixel: &[u8])
[src]
pub fn pixel_stride(&self) -> usize
[src]
pub fn unmap(&mut self, ctx: &mut Context) -> &Image
[src]
Trait Implementations
Auto Trait Implementations
impl<T, D> RefUnwindSafe for Mapped<T, D> where
D: RefUnwindSafe,
T: RefUnwindSafe,
D: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, D> Send for Mapped<T, D> where
T: Send,
T: Send,
impl<T, D> Sync for Mapped<T, D> where
T: Sync,
T: Sync,
impl<T, D> Unpin for Mapped<T, D> where
D: Unpin,
T: Unpin,
D: Unpin,
T: Unpin,
impl<T, D> UnwindSafe for Mapped<T, D> where
D: UnwindSafe,
T: UnwindSafe,
D: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,