On the reference page for SurfaceFormat, it indicates that the Bgra4444 format is an unsigned format which is 16-bits long, with 4 bits per color with alpha. Further down the page, it describes the Rgba64 format as being 64-bits long, with 16 bits per color (including alpha).

Why does one format list R-G-B as the color order, while the other lists it as B-G-R? I understand it likely has to do with the underlying hardware, but there certainly needs to be a reason that it wants it in a reversed order for the other format.

  • 3
    \$\begingroup\$ why is there big and little endian? kinda the same issue \$\endgroup\$ – ratchet freak Dec 17 '14 at 20:33

"Just because."

Byte ordering is more-or-less arbitrary. Some hardware will do it one way, other hardware will do it another way... there's basically an equally valid argument in both directions so you just pick one.

There's no particularly relevant technical reason why some formats are in RGB order and others in BGR. It likely comes down to when the format support was needed, it was asked for in that order (because that was the client preference, or because somebody was mimicking or emulating older hardware that did it that way).

  • \$\begingroup\$ Big-Endian or Little-Endian. One might as well argue over which end one should crack a boiled egg at. \$\endgroup\$ – Pieter Geerkens Dec 18 '14 at 3:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.