From dce8c74ddaea0add753084380e262c3fa6f84d30 Mon Sep 17 00:00:00 2001 From: Arkadiusz Lach Date: Thu, 26 Jun 2025 15:11:24 +0200 Subject: [PATCH] fix: Loading textures without transparency in DirectX --- src/framework/graphics/texture.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/framework/graphics/texture.cpp b/src/framework/graphics/texture.cpp index 93cd6701ce..9f740c8d6d 100644 --- a/src/framework/graphics/texture.cpp +++ b/src/framework/graphics/texture.cpp @@ -223,12 +223,15 @@ void Texture::setupPixels(const int level, const Size& size, const uint8_t* pixe ) const { GLenum format = 0; + GLenum internalFormat = GL_R8; switch (channels) { case 4: format = GL_RGBA; + internalFormat = GL_RGBA; break; case 3: format = GL_RGB; + internalFormat = GL_RGB; break; case 2: format = GL_LUMINANCE_ALPHA; @@ -238,8 +241,6 @@ void Texture::setupPixels(const int level, const Size& size, const uint8_t* pixe break; } - GLenum internalFormat = GL_RGBA; - #ifdef OPENGL_ES //TODO #else