MCPcopy Create free account
hub / github.com/GPUOpen-Tools/compressonator / Rgba2Texture

Function Rgba2Texture

applications/_plugins/common/cexr.cpp:87–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87void Rgba2Texture(Array2D<Rgba>& pixels, CMP_HALFSHORT* data, int w, int h)
88{
89 // Save the Half Data format value into CMP_HALFSHORT bit format for processing later
90 for (int y = 0; y < h; ++y)
91 {
92 for (int x = 0; x < w; ++x)
93 {
94 *data = pixels[y][x].r.bits();
95 data++;
96 *data = pixels[y][x].g.bits();
97 data++;
98 *data = pixels[y][x].b.bits();
99 data++;
100 *data = pixels[y][x].a.bits();
101 data++;
102 }
103 }
104}
105
106void Texture2Rgba(CMP_HALFSHORT* data, Array2D<Rgba>& pixels, int w, int h, CMP_FORMAT isDeCompressed)
107{

Callers 2

loadImageFunction · 0.85

Calls 1

bitsMethod · 0.80

Tested by

no test coverage detected