Closed Cewein closed 4 years ago
as of now we can't load texture with a alpha channel ? why i'm look for it. I might be related to this part of the code :
``` glGenTextures(1, &(this->id)); glBindTexture(GL_TEXTURE_2D, this->id); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); switch (this->nbChannels) { case 3: glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, this->width, this->height, 0, GL_RGB, GL_UNSIGNED_BYTE, data); break; case 4: glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, this->width, this->height, 0, GL_RGBA, GL_UNSIGNED_BYTE, data); break; default: break; } glGenerateMipmap(GL_TEXTURE_2D); logger.initLog("uploaded texture to GC"); stbi_image_free(data); logger.initLog("cleaned texture's data");
since 17dad21c8d6206c54d625964f719d6dc029c0a3c and maybe priore we can load HDR, transparent and other type of texture, so this bug is fix
as of now we can't load texture with a alpha channel ? why i'm look for it. I might be related to this part of the code :