Implemented basic game dll interaction

This commit is contained in:
Dynamitos
2023-01-29 18:58:59 +01:00
parent 2208ab438a
commit 0dce84459e
72 changed files with 1297 additions and 350 deletions
+3 -2
View File
@@ -38,7 +38,7 @@ void MaterialLoader::import(std::filesystem::path name, PMaterialAsset asset)
json j;
stream >> j;
std::string materialName = j["name"].get<std::string>() + "Material";
Gfx::PDescriptorLayout layout = WindowManager::getGraphics()->createDescriptorLayout(materialName + "Layout");
Gfx::PDescriptorLayout layout = graphics->createDescriptorLayout(materialName + "Layout");
//Shader file needs to conform to the slang standard, which prohibits _
materialName.erase(std::remove(materialName.begin(), materialName.end(), '_'), materialName.end());
materialName.erase(std::remove(materialName.begin(), materialName.end(), '.'), materialName.end());
@@ -111,7 +111,7 @@ void MaterialLoader::import(std::filesystem::path name, PMaterialAsset asset)
{
PSamplerParameter p = new SamplerParameter(param.key(), 0, bindingCounter);
layout->addDescriptorBinding(bindingCounter++, Gfx::SE_DESCRIPTOR_TYPE_SAMPLER);
p->data = WindowManager::getGraphics()->createSamplerState({});
p->data = graphics->createSamplerState({});
parameters.add(p);
}
else
@@ -128,6 +128,7 @@ void MaterialLoader::import(std::filesystem::path name, PMaterialAsset asset)
codeStream.close();
layout->create();
asset->material = new Material(
graphics,
std::move(parameters),
std::move(layout),
uniformDataSize,