hibiscus/core/resources/texture.cpp
2023-05-30 17:00:39 +01:00

21 lines
398 B
C++

#include "texture.hpp"
namespace hibis {
Texture::Texture(char* path) : mData(), mImageWidth(0), mImageHeight(0), mBuffer() {
unsigned int error = lodepng::load_file(mBuffer, path);
if (error) {
TODO("error message")
return;
}
error = lodepng::decode(mData, mImageWidth, mImageHeight, mBuffer);
if (error) {
TODO("error message")
return;
}
}
Texture::~Texture() {}
}