hibiscus/core/resources/texture.cpp

21 lines
398 B
C++
Raw Normal View History

2023-05-30 16:00:39 +00:00
#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() {}
}