Fist assetsystem implementations for textures and materials
This commit is contained in:
@@ -6,14 +6,15 @@
|
||||
#include <any>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include "interfaces/IAsset.hpp"
|
||||
#include "json.hpp"
|
||||
|
||||
namespace TSE
|
||||
{
|
||||
struct Material
|
||||
struct Material : public IAsset
|
||||
{
|
||||
private:
|
||||
string name;
|
||||
uuids::uuid id;
|
||||
IShader* shader;
|
||||
|
||||
std::unordered_map<string, std::tuple<std::any, string, string>> values;
|
||||
@@ -40,6 +41,13 @@ namespace TSE
|
||||
IShader* GetShader() const;
|
||||
void SetShader(IShader* shader);
|
||||
uuids::uuid GetID() const;
|
||||
|
||||
bool LoadAsset(string& path) override;
|
||||
void SaveAsset() override;
|
||||
nlohmann::ordered_json GenerateMaterialJson();
|
||||
void Hash() override;
|
||||
protected:
|
||||
void SaveMeta() override;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
|
||||
Reference in New Issue
Block a user