wayland-rs
wayland-rs copied to clipboard
simple_window example endianness
https://github.com/Smithay/wayland-rs/blob/e0b35a6f2bde7efec10eb1d51bfa194c62313672/wayland-client/examples/simple_window.rs#L55
simple_window example use u32::to_ne_bytes() that return the native endian representation array of the integer but the documentation of Argb8888 says:
Argb8888 32-bit ARGB format, [31:0] A:R:G:B 8:8:8:8 little endian
Confirmed by official wayland doc about Argb8888:
argb8888 0 - 32-bit ARGB format, [31:0] A:R:G:B 8:8:8:8 little endian
So, shouldn't the example on the contrary use u32::to_le_bytes() ?
Good point, I guess I mixed up with the wayland wire format, which is specified to be native-endian. :sweat_smile: