Files
Seele/src/Editor/Asset/MaterialLoader.h
T

28 lines
646 B
C++
Raw Normal View History

2020-06-02 11:46:18 +02:00
#pragma once
#include "MinimalEngine.h"
#include "Containers/List.h"
2020-08-11 22:38:19 +02:00
#include <filesystem>
2020-06-02 11:46:18 +02:00
namespace Seele
{
2021-10-19 23:04:38 +02:00
DECLARE_REF(MaterialAsset)
2021-04-01 16:40:14 +02:00
DECLARE_NAME_REF(Gfx, Graphics)
2023-02-01 22:13:04 +01:00
struct MaterialImportArgs
{
std::filesystem::path filePath;
std::string importPath;
};
2020-06-02 11:46:18 +02:00
class MaterialLoader
{
public:
MaterialLoader(Gfx::PGraphics graphic);
~MaterialLoader();
2023-02-01 22:13:04 +01:00
void importAsset(MaterialImportArgs args);
2021-10-19 23:04:38 +02:00
PMaterialAsset getPlaceHolderMaterial();
2020-06-02 11:46:18 +02:00
private:
2023-02-01 22:13:04 +01:00
void import(MaterialImportArgs args, PMaterialAsset asset);
2020-09-19 14:36:50 +02:00
Gfx::PGraphics graphics;
2021-10-19 23:04:38 +02:00
PMaterialAsset placeholderMaterial;
2020-06-02 11:46:18 +02:00
};
2021-04-01 16:40:14 +02:00
DEFINE_REF(MaterialLoader)
2020-06-02 11:46:18 +02:00
} // namespace Seele