From 41fbca10f6c6cdd9c1623f1347e7ecb40f5e7f59 Mon Sep 17 00:00:00 2001 From: Mel Date: Sat, 8 Jul 2023 01:20:53 +0200 Subject: Add crude texture transparency --- src/GFX/Texture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/GFX/Texture.cpp') diff --git a/src/GFX/Texture.cpp b/src/GFX/Texture.cpp index 64151a5..16f7dce 100644 --- a/src/GFX/Texture.cpp +++ b/src/GFX/Texture.cpp @@ -17,7 +17,7 @@ Texture::Texture(const Image::RawImage& image) { // will begin at the incorrect byte, causing color artifacts. glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, image.width(), image.height(), 0, GL_RGB, GL_UNSIGNED_BYTE, image.raw()); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, image.width(), image.height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, image.raw()); glGenerateMipmap(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, 0); -- cgit 1.4.1