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());
}
}

View File

@@ -2,10 +2,10 @@
// This file is part of the "Nazara Engine - Renderer module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/Renderer/ShaderStage.hpp>
#include <Nazara/Renderer/ShaderModule.hpp>
#include <Nazara/Renderer/Debug.hpp>
namespace Nz
{
ShaderStage::~ShaderStage() = default;
ShaderModule::~ShaderModule() = default;
}