Skip to main content
← PSoXide SDK guides and examples · SDK f2fec1c301f1 · All Cargo features enabled; check feature gates before use.

upload_bytes

Function upload_bytes 

Source
pub fn upload_bytes(rect: VramRect, bytes: &[u8])
Expand description

Upload raw byte-stream pixel data, interpreted as halfwords in little-endian order. Same semantics as upload_16bpp but accepts a &[u8] – useful when the data comes from include_bytes! of a cooked asset blob, where the returned byte array has alignment 1 and a direct &[u16] reinterpret would be undefined behaviour.

rect.w still measures halfwords (the VRAM native unit). The byte length must be exactly 2 × rect.w × rect.h.