Fist assetsystem implementations for textures and materials

This commit is contained in:
2026-05-06 19:45:14 +02:00
parent 1665569326
commit 95bdb1c8bb
19 changed files with 1069 additions and 49 deletions

View File

@@ -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>