[−][src]Function gaclen::graphics::image::create_immutable_image_from_iter
pub fn create_immutable_image_from_iter<P, I, F>(
device: &Device,
data_iterator: I,
dimensions: Dimensions,
format: F
) -> Result<Arc<ImmutableImage<F>>, ImageCreationError> where
P: Send + Sync + Clone + 'static,
F: FormatDesc + AcceptsPixels<P> + Send + Sync + 'static,
I: ExactSizeIterator<Item = P>,
Format: AcceptsPixels<P>,
Create an ImmutableImage
from a data iterator.
Builds an intermediate memory-mapped buffer, writes data to it, builds a copy (upload) command buffer and executes it.
Panic.
- Panics if fails to submit the copy command buffer.