12345678910111213141516 |
- #include "client/rendering/FileTexture.h"
- #include "client/utils/PNGReader.h"
- FileTexture::FileTexture(const char* path) {
- u32 width;
- u32 height;
- u32* data = PNGReader::load(path, width, height);
- if(data != nullptr) {
- texture.setRGBAData(width, height, data);
- delete[] data;
- }
- }
- void FileTexture::bind(uint index) const {
- texture.bind(index);
- }
|