#pragma once
#include "render/asset/model.h"
#include "asset/resource_manager.h"
class aiNode;
class aiMesh;
class aiScene;
namespace engineapi {
	class AssimpLoader : public IFileLoader
	{
		inline static table<Guid, void*> ShaderTable;
	public:
		static void Init();
		ResourceBundle LoadFile(PackagePath handle, const MetaBundle& meta) override;

		void LoadModel(PackagePath handle, Model& model, const MetaBundle& meta);
		void ProcessNode(Model& model, const MetaBundle& meta, const aiNode* pNode, const aiScene* pScene);
		RscHandle<Mesh> ProcessMesh(const SerializedMeta* m, const aiMesh* mesh);
	};
}