#include "shader.h"
#include "asset/asset_manager.h"
#include "../renderapi.h"
namespace engineapi {
	Shader::Shader(string name, uint32_t flags)
		:Asset(name, flags)
	{
		BeginLoad();
	}
	Shader::~Shader()
	{
	}
	void Shader::BeginLoad()
	{
		json data = AssetManager::LoadJsonFile(mName + ".json");
		RenderAPI::GetSingletonPtr()->LoadShader(this);
		//ShaderProperty
		//mInfo.vertProperties.baseProperties.push_back
	}
	vector<char> Shader::GetVertData()
	{
		return AssetManager::LoadBinaryFile(mName + ".vert.spv");
	}
	vector<char> Shader::GetFragData()
	{
		return AssetManager::LoadBinaryFile(mName + ".frag.spv");
	}
}
