/// Same as `load_buffer_with_staging` but loads an r8b8g8a8 image instead.
Same as `load_buffer_with_staging` but loads an r8b8g8a8 image instead.
Same as ` load_buffer_with_staging ` but loads an r8b8g8a8 image instead .
pub(crate) fn load_image_with_staging_initialization(
    this: &Arc<RwLock<Self>>, pixels: impl ImageData,
    magnification_filter: MagnificationMinificationFilter,
    minification_filter: MagnificationMinificationFilter, address_x: TextureAddressMode,
    address_y: TextureAddressMode, address_z: TextureAddressMode, mip_levels: u32,
  ) -> SarektResult<(BufferImageHandle<BL>, BufferOrImage<BL::BackendHandle>)> {
    let mut buffer_store = this
      .write()
      .expect("Could not unlock BufferStore due to previous panic");
    let buffer_backend_handle = buffer_store
      .buffer_image_loader
      .load_image_with_staging_initialization(
        pixels,
        magnification_filter,
        minification_filter,
        address_x,
        address_y,
        address_z,
        mip_levels,
      )?;
    let buffer_or_image = BufferOrImage::new(buffer_backend_handle, ResourceType::Image);
    let inner_key = buffer_store
      .loaded_buffers_and_images
      .insert(buffer_or_image);
    Ok((
      BufferImageHandle {
        inner_key,
        resource_type: ResourceType::Image,
        buffer_store: Arc::downgrade(this),
      },
      buffer_or_image,
    ))
  }
pub ( crate ) fn load_image_with_staging_initialization ( this : & Arc < RwLock < Self > > , pixels : impl ImageData , magnification_filter : MagnificationMinificationFilter , minification_filter : MagnificationMinificationFilter , address_x : TextureAddressMode , address_y : TextureAddressMode , address_z : TextureAddressMode , mip_levels : u32 , ) -> SarektResult < ( BufferImageHandle < BL > , BufferOrImage < BL :: BackendHandle > ) > { let mut buffer_store = this . write ( ) . expect ( " " ) ; let buffer_backend_handle = buffer_store . buffer_image_loader . load_image_with_staging_initialization ( pixels , magnification_filter , minification_filter , address_x , address_y , address_z , mip_levels , ) ? ; let buffer_or_image = BufferOrImage :: new ( buffer_backend_handle , ResourceType :: Image ) ; let inner_key = buffer_store . loaded_buffers_and_images . insert ( buffer_or_image ) ; Ok ( ( BufferImageHandle { inner_key , resource_type : ResourceType :: Image , buffer_store : Arc :: downgrade ( this ) , } , buffer_or_image , ) ) }
Same as `load_buffer_with_staging` but loads an r8b8g8a8 image instead.
Same as ` load_buffer_with_staging ` but loads an r8b8g8a8 image instead .
this
&Arc<RwLock<Self>>
pixels
impl ImageData
magnification_filter
MagnificationMinificationFilter
minification_filter
MagnificationMinificationFilter
address_x
TextureAddressMode
address_y
TextureAddressMode
address_z
TextureAddressMode
mip_levels
u32