[CORE][CHG] Add logger in texture loader

This commit is contained in:
Linloir 2022-12-18 10:02:39 +08:00
parent b2bcba75ea
commit aeaac1833f
No known key found for this signature in database
GPG Key ID: 58EEB209A0F2C366

View File

@ -34,12 +34,15 @@ Texture::Texture(TextureType type, std::string path) {
if (data) {
GLenum format;
if (nrChannels == 1) {
Logger::debug("Texture " + _path + " is a grayscale image");
format = GL_RED;
}
else if (nrChannels == 3) {
Logger::debug("Texture " + _path + " is a RGB image");
format = GL_RGB;
}
else if (nrChannels == 4) {
Logger::debug("Texture " + _path + " is a RGBA image");
format = GL_RGBA;
}
else {