#include "../../include/mglpp/graphics/Texture.hpp" namespace mgl { Texture::Texture() { texture.id = 0; } Texture::~Texture() { mgl_texture_unload(&texture); } bool Texture::load_from_file(const char *filepath) { if(texture.id) return false; /* TODO: use the last arg (load options) */ return mgl_texture_load_from_file(&texture, filepath, nullptr) == 0; } vec2i Texture::size() const { return { texture.width, texture.height }; } mgl_texture* Texture::internal_texture() { return &texture; } }