Renderer: Replace ShaderStage by ShaderModule (a module can handle multiple stages)

This commit is contained in:
Jérôme Leclercq
2021-03-31 11:13:37 +02:00
parent c1d1838336
commit e4aabf309e
25 changed files with 235 additions and 198 deletions

View File

@@ -11,7 +11,7 @@ namespace Nz
{
RenderDevice::~RenderDevice() = default;
std::shared_ptr<ShaderStage> RenderDevice::InstantiateShaderStage(ShaderStageType type, ShaderLanguage lang, const std::filesystem::path& sourcePath)
std::shared_ptr<ShaderModule> RenderDevice::InstantiateShaderModule(ShaderStageTypeFlags shaderStages, ShaderLanguage lang, const std::filesystem::path& sourcePath)
{
File file(sourcePath);
if (!file.Open(OpenMode_ReadOnly | OpenMode_Text))
@@ -29,6 +29,6 @@ namespace Nz
return {};
}
return InstantiateShaderStage(type, lang, source.data(), source.size());
return InstantiateShaderModule(shaderStages, lang, source.data(), source.size());
}
}