pub fn texture_from_image(image: &Image) -> Result<Texture>Expand description
Convert one packed RGBA8 HWC image into an independent Texture value.
The operation retains the texture/image semantic distinction and performs a device-side deep copy. Other image layouts, channel orders, and scalar representations require an explicit image conversion before this boundary.
ยงErrors
Returns an error unless image is an unbatched U8 HWC RGBA image or its
device copy cannot be recorded.