oa::render::texture_from_image

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.

FnRust public API

Function Documentation

pub fn texture_from_image( image: &Image ) -> Result<Texture>
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.