2023-01-21 18:43:21 +01:00
|
|
|
#pragma once
|
2020-06-02 11:46:18 +02:00
|
|
|
#include "Asset.h"
|
|
|
|
|
|
2024-05-01 14:10:52 +02:00
|
|
|
struct ktxTexture2;
|
2024-06-09 12:20:04 +02:00
|
|
|
namespace Seele {
|
2021-04-01 16:40:14 +02:00
|
|
|
DECLARE_NAME_REF(Gfx, Texture)
|
2024-06-09 12:20:04 +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;
|
2023-11-06 14:47:21 +01:00
|
|
|
void setTexture(Gfx::OTexture _texture);
|
2024-06-09 12:20:04 +02:00
|
|
|
Gfx::PTexture getTexture() { return texture; }
|
2023-11-11 13:56:12 +01:00
|
|
|
uint32 getWidth();
|
|
|
|
|
uint32 getHeight();
|
2024-06-09 12:20:04 +02:00
|
|
|
|
|
|
|
|
private:
|
2023-11-05 10:36:01 +01:00
|
|
|
Gfx::OTexture texture;
|
2024-05-04 09:25:13 +02:00
|
|
|
bool normalMap;
|
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
|