LibGL: Fix interpretation of BGRA byte order

This fixes byte order interpretation in several places.
This commit is contained in:
Stephan Unverwerth 2021-08-18 13:20:00 +02:00 committed by Andreas Kling
commit 22905daacb
Notes: sideshowbarker 2024-07-18 05:30:49 +09:00
4 changed files with 39 additions and 72 deletions

View file

@ -34,9 +34,9 @@ public:
u32 texel = m_pixel_data.at(y * m_width + x);
return {
(texel & 0xff) / 255.f,
((texel >> 8) & 0xff) / 255.f,
((texel >> 16) & 0xff) / 255.f,
((texel >> 8) & 0xff) / 255.f,
(texel & 0xff) / 255.f,
((texel >> 24) & 0xff) / 255.f
};
}