From d03660870733970d1e45b6140b71e82de1ccd27e Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Tue, 13 Jan 2026 00:50:42 +0600 Subject: [PATCH] Fix texture loading --- src/qt/qt_openglrenderer.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qt/qt_openglrenderer.cpp b/src/qt/qt_openglrenderer.cpp index 22e400c65..788a74744 100644 --- a/src/qt/qt_openglrenderer.cpp +++ b/src/qt/qt_openglrenderer.cpp @@ -600,7 +600,7 @@ load_texture(const char *f, struct shader_texture *tex) const GLubyte *rgb = img.constBits(); - int bpp = 4; + int bpp = 3; GLubyte *data = (GLubyte *) malloc((size_t) width * height * bpp); @@ -611,7 +611,6 @@ load_texture(const char *f, struct shader_texture *tex) data[(y * width + x) * bpp + 0] = rgb[(Y * width + x) * 3 + 0]; data[(y * width + x) * bpp + 1] = rgb[(Y * width + x) * 3 + 1]; data[(y * width + x) * bpp + 2] = rgb[(Y * width + x) * 3 + 2]; - data[(y * width + x) * bpp + 3] = rgb[(Y * width + x) * 3 + 3]; } }