fix: correct texture color channel mapping and mipmap conversion for Linux

This commit is contained in:
JuiceyDev 2026-03-06 21:33:41 +01:00
parent 2aa0058a8d
commit f8510b88f0
2 changed files with 2 additions and 2 deletions

View file

@ -568,7 +568,7 @@ void Texture::transferFromImage(BufferedImage *image)
#ifdef _XBOX
int byteRemapRGBA[] = { 0, 1, 2, 3 };
#else
int byteRemapRGBA[] = { 3, 0, 1, 2 };
int byteRemapRGBA[] = { 0, 1, 2, 3 };
#endif
int byteRemapBGRA[] = { 3, 2, 1, 0 };
// #endif

View file

@ -611,7 +611,7 @@ void Textures::loadTexture(BufferedImage *img, int id, bool blur, bool clamp)
// Swap ARGB to RGBA
for( int i = 0; i < ww * hh ; i++ )
{
tempData[i] = ( tempData[i] >> 24 ) | (tempData[i] << 8 );
tempData[i] = ( tempData[i] << 8 ) | ( ( tempData[i] >> 24 ) & 0xff );
}
#endif
}