#include "client/rendering/FileTexture.h"
#include "client/utils/PNGReader.h"

FileTexture::FileTexture(const char* path) {
    u32 maxWidth = 256;
    u32 maxHeight = 256;
    u32 buffer[256 * 256];
    if(PNGReader::load(path, buffer, maxWidth, maxHeight)) {
        texture.setRGBAData(maxWidth, maxHeight, buffer);
    }
}

void FileTexture::bind(uint index) const {
    texture.bind(index);
}