Fixing slang compilation temporarily, renaming vertexfactory

This commit is contained in:
Dynamitos committed 2020-08-06 00:54:43 +02:00
1 parent ab4a3b5e23
commit f27859a02c
66 files changed
+1005 -627

No files matched your search

+18
View File
@@ -1,7 +1,10 @@
#include "MaterialAsset.h"
#include "Graphics/VertexShaderInput.h"
using namespace Seele;
Gfx::ShaderMap MaterialAsset::shaderMap;
MaterialAsset::MaterialAsset()
{
}
@@ -19,3 +22,18 @@ MaterialAsset::MaterialAsset(const std::filesystem::path& fullPath)
MaterialAsset::~MaterialAsset()
{
}
const Gfx::ShaderCollection* MaterialAsset::getShaders(Gfx::RenderPassType renderPass, PVertexShaderInput vertexInput) const
{
Gfx::ShaderPermutation permutation;
std::string materialName = getMaterialName();
std::string vertexInputName = vertexInput->getName();
std::memcpy(permutation.materialName, materialName.c_str(), sizeof(permutation.materialName));
std::memcpy(permutation.materialName, vertexInputName.c_str(), sizeof(permutation.materialName));
return shaderMap.findShaders(Gfx::PermutationId(permutation));
}
Gfx::ShaderCollection& MaterialAsset::createShaders(Gfx::RenderPassType renderPass, PVertexShaderInput vertexInput)
{
return Gfx::ShaderCollection();
}