Fix texture loading

This commit is contained in:
MrLetsplay 2023-09-13 21:35:12 +02:00
parent c7572cf782
commit da91e92124
Signed by: mr
SSH Key Fingerprint: SHA256:92jBH80vpXyaZHjaIl47pjRq+Yt7XGTArqQg1V7hSqg

View File

@ -33,7 +33,7 @@ Texture::Texture(std::string texturePath) {
throw std::exception();
}
unsigned char *data = stbi_load_from_memory((stbi_uc *) buf->buffer, buf->length, &width, &height, &nrChannels, 0);
unsigned char *data = stbi_load_from_memory((stbi_uc *) buf->buffer, buf->length, &width, &height, &nrChannels, 3);
delete buf;
float borderColor[] = {1.0f, 0.0f, 1.0f, 1.0f};