Fix regression
Fixed a bug introduced when removing SOIL that'd cause non-alpha PNGs to display incorrectly.
This commit is contained in:
@@ -56,7 +56,7 @@ CPMAddPackage(
|
||||
|
||||
CPMAddPackage(
|
||||
NAME ReTexture
|
||||
URL https://git.redacted.cc/Redacted/ReTexture/archive/vA0.1.zip
|
||||
URL https://git.redacted.cc/Redacted/ReTexture/archive/Prerelease-1.zip
|
||||
)
|
||||
|
||||
CPMAddPackage(
|
||||
|
@@ -9,7 +9,7 @@ void Texture::load(Entity* entity, const std::string& file, bool storeOnTextureL
|
||||
if (texture->format == RTextureFormat::RGBA)
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texture->width, texture->height, 0, GL_RGBA, GL_UNSIGNED_BYTE, texture->pixelData.data());
|
||||
if (texture->format == RTextureFormat::RGB)
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, texture->width, texture->height, 0, GL_RGBA, GL_UNSIGNED_BYTE, texture->pixelData.data());
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, texture->width, texture->height, 0, GL_RGB, GL_UNSIGNED_BYTE, texture->pixelData.data());
|
||||
delete texture;
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
|
Reference in New Issue
Block a user