Push de couleur qui marche pas 💢

This commit is contained in:
Claudel-D-Roy
2023-11-20 15:02:02 -05:00
parent 85b8f4b94b
commit 02fafea45c
4 changed files with 20 additions and 3 deletions

View File

@@ -40,6 +40,9 @@ TextureAtlas::TextureIndex TextureAtlas::AddTexture(const std::string& fname) {
}
bool TextureAtlas::Generate(int textureSize, bool mipmap) {
// TODO mipmap pas encore 100% parfait...
assert(!mipmap);
@@ -66,9 +69,9 @@ bool TextureAtlas::Generate(int textureSize, bool mipmap) {
ilOriginFunc(IL_ORIGIN_LOWER_LEFT);
ilEnable(IL_ORIGIN_SET);
ilEnable(IL_ALPHA);
if (!ilLoadImage((const ILstring)it->first.c_str()))
if (!ilLoad(IL_PNG,(const ILstring)it->first.c_str()))
return false;
if (!ilConvertImage(IL_RGBA, IL_UNSIGNED_BYTE))
@@ -171,8 +174,10 @@ bool TextureAtlas::Generate(int textureSize, bool mipmap) {
mipmapSize /= 2;
}
m_isValid = true;
return true;
}