bitsToFormat

Format a bit count into the related Texture.Format. If no bit count is supported, it returns Texture.Format.None.

@nogc
bitsToFormat
pure nothrow
(
ubyte bits
,
bool reverse = false
)

Examples

assert(bitsToFormat(32) == Texture.Format.RGBA);
assert(bitsToFormat(24) == Texture.Format.RGB);
assert(bitsToFormat(32, true) == Texture.Format.BGRA);
assert(bitsToFormat(24, true) == Texture.Format.BGR);

Meta