Files
Seele/src/Engine/Asset/TextureAsset.h
T

30 lines
675 B
C++
Raw Normal View History

2023-01-21 18:43:21 +01:00
#pragma once
2020-06-02 11:46:18 +02:00
#include "Asset.h"
namespace Seele
{
2021-04-01 16:40:14 +02:00
DECLARE_NAME_REF(Gfx, Texture)
2020-06-02 11:46:18 +02:00
class TextureAsset : public Asset
{
public:
2023-02-13 14:56:13 +01:00
static constexpr uint64 IDENTIFIER = 0x1;
2020-06-02 11:46:18 +02:00
TextureAsset();
2023-02-13 14:56:13 +01:00
TextureAsset(std::string_view folderPath, std::string_view name);
2020-06-08 01:44:47 +02:00
virtual ~TextureAsset();
2023-02-13 14:56:13 +01:00
virtual void save(ArchiveBuffer& buffer) const override;
virtual void load(ArchiveBuffer& buffer) override;
void setTexture(Gfx::PTexture _texture)
2020-06-02 11:46:18 +02:00
{
texture = _texture;
2020-06-02 11:46:18 +02:00
}
Gfx::PTexture getTexture()
{
return texture;
}
private:
Gfx::PTexture texture;
2021-01-19 15:30:00 +01:00
friend class TextureLoader;
2020-06-02 11:46:18 +02:00
};
2021-04-01 16:40:14 +02:00
DEFINE_REF(TextureAsset)
2020-06-02 11:46:18 +02:00
} // namespace Seele