From ae9665772a10862cd9b1f83de927f8ba8dd697a6 Mon Sep 17 00:00:00 2001 From: Alexis Maiquez Date: Tue, 2 Apr 2019 22:27:43 +0200 Subject: [PATCH] ~ Fixed black bars on textures that weren't power of two Signed-off-by: Alexis Maiquez --- wallpaperengine/irr/CImageLoaderTEX.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wallpaperengine/irr/CImageLoaderTEX.cpp b/wallpaperengine/irr/CImageLoaderTEX.cpp index e73a84c..161a4a2 100644 --- a/wallpaperengine/irr/CImageLoaderTEX.cpp +++ b/wallpaperengine/irr/CImageLoaderTEX.cpp @@ -158,10 +158,10 @@ namespace irr { for (u32 x = 0; x < width; x ++) { - imagedata [baseDestination + (x * bytesPerPixel) + 2] = decompressedBuffer [baseOrigin + ((mipmap_width - x) * 4) + 0]; // r - imagedata [baseDestination + (x * bytesPerPixel) + 1] = decompressedBuffer [baseOrigin + ((mipmap_width - x) * 4) + 1]; // g - imagedata [baseDestination + (x * bytesPerPixel) + 0] = decompressedBuffer [baseOrigin + ((mipmap_width - x) * 4) + 2]; // b - imagedata [baseDestination + (x * bytesPerPixel) + 3] = decompressedBuffer [baseOrigin + ((mipmap_width - x) * 4) + 3]; // alpha + imagedata [baseDestination + (x * bytesPerPixel) + 2] = decompressedBuffer [baseOrigin + ((width - x) * 4) + 0]; // r + imagedata [baseDestination + (x * bytesPerPixel) + 1] = decompressedBuffer [baseOrigin + ((width - x) * 4) + 1]; // g + imagedata [baseDestination + (x * bytesPerPixel) + 0] = decompressedBuffer [baseOrigin + ((width - x) * 4) + 2]; // b + imagedata [baseDestination + (x * bytesPerPixel) + 3] = decompressedBuffer [baseOrigin + ((width - x) * 4) + 3]; // alpha } }