MCPcopy Create free account
hub / github.com/axmolengine/axmol / convertR8ToRG8

Function convertR8ToRG8

core/renderer/backend/PixelFormatUtils.cpp:238–246  ·  view source on GitHub ↗

IIIIIIII -> IIIIIIIIAAAAAAAA

Source from the content-addressed store, hash-verified

236
237// IIIIIIII -> IIIIIIIIAAAAAAAA
238static void convertR8ToRG8(const unsigned char* data, size_t dataLen, unsigned char* outData)
239{
240 unsigned short* out16 = (unsigned short*)outData;
241 for (size_t i = 0; i < dataLen; ++i)
242 {
243 *out16++ = 0xFF00 // A
244 | data[i]; // I
245 }
246}
247
248// IIIIIIIIAAAAAAAA -> AAAAAAAA
249static void convertRG8ToR8(const unsigned char* data, size_t dataLen, unsigned char* outData)

Callers 1

convertR8ToFormatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected