2020-06-02 11:46:18 +02:00
|
|
|
#include "Asset.h"
|
|
|
|
|
|
|
|
|
|
namespace Seele
|
|
|
|
|
{
|
|
|
|
|
DECLARE_NAME_REF(Gfx, Texture);
|
|
|
|
|
class TextureAsset : public Asset
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
TextureAsset();
|
|
|
|
|
TextureAsset(const std::string& directory, const std::string& name);
|
2020-06-08 01:44:47 +02:00
|
|
|
TextureAsset(const std::filesystem::path& fullPath);
|
|
|
|
|
virtual ~TextureAsset();
|
|
|
|
|
virtual void save() override;
|
|
|
|
|
virtual void load() override;
|
2020-06-02 11:46:18 +02:00
|
|
|
void setTexture(Gfx::PTexture texture)
|
|
|
|
|
{
|
|
|
|
|
std::scoped_lock lck(lock);
|
|
|
|
|
this->texture = texture;
|
|
|
|
|
}
|
|
|
|
|
Gfx::PTexture getTexture()
|
|
|
|
|
{
|
|
|
|
|
return texture;
|
|
|
|
|
}
|
|
|
|
|
private:
|
|
|
|
|
Gfx::PTexture texture;
|
|
|
|
|
};
|
|
|
|
|
DEFINE_REF(TextureAsset);
|
|
|
|
|
} // namespace Seele
|