pub struct GpuRasterBuffer<T: Pod> { /* private fields */ }Expand description
GPU raster buffer for multi-band raster data.
This struct manages GPU buffers for multi-band raster data with efficient interleaved or planar storage.
Implementations§
Source§impl<T: Pod + Zeroable> GpuRasterBuffer<T>
impl<T: Pod + Zeroable> GpuRasterBuffer<T>
Sourcepub fn new(
context: &GpuContext,
width: u32,
height: u32,
num_bands: usize,
usage: BufferUsages,
) -> GpuResult<Self>
pub fn new( context: &GpuContext, width: u32, height: u32, num_bands: usize, usage: BufferUsages, ) -> GpuResult<Self>
Sourcepub fn from_bands(
context: &GpuContext,
width: u32,
height: u32,
bands_data: &[Vec<T>],
usage: BufferUsages,
) -> GpuResult<Self>
pub fn from_bands( context: &GpuContext, width: u32, height: u32, bands_data: &[Vec<T>], usage: BufferUsages, ) -> GpuResult<Self>
Sourcepub fn band_mut(&mut self, index: usize) -> Option<&mut GpuBuffer<T>>
pub fn band_mut(&mut self, index: usize) -> Option<&mut GpuBuffer<T>>
Get mutable reference to a specific band buffer.
Sourcepub fn dimensions(&self) -> (u32, u32)
pub fn dimensions(&self) -> (u32, u32)
Get raster dimensions.
Sourcepub async fn read_all_bands(&self) -> GpuResult<Vec<Vec<T>>>
pub async fn read_all_bands(&self) -> GpuResult<Vec<Vec<T>>>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for GpuRasterBuffer<T>
impl<T> !RefUnwindSafe for GpuRasterBuffer<T>
impl<T> Send for GpuRasterBuffer<T>where
T: Send,
impl<T> Sync for GpuRasterBuffer<T>where
T: Sync,
impl<T> Unpin for GpuRasterBuffer<T>where
T: Unpin,
impl<T> UnsafeUnpin for GpuRasterBuffer<T>
impl<T> !UnwindSafe for GpuRasterBuffer<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more