oa::render::texture_from_rgba8

Upload one exact packed row-major RGBA8 host image as a Texture. Errors Returns an error for zero or overflowing dimensions, a mismatched byte count, exhausted semantic identity, or device allocation/upload failure.

FnRust public API

Function Documentation

pub fn texture_from_rgba8( engine: &Engine, rgba: &[u8], width: usize, height: usize ) -> Result<Texture>
Upload one exact packed row-major RGBA8 host image as a Texture. Errors Returns an error for zero or overflowing dimensions, a mismatched byte count, exhausted semantic identity, or device allocation/upload failure.