Renderer: Add ShaderStage class

This commit is contained in:
Lynix
2020-02-29 23:28:21 +01:00
parent 798425ce10
commit 5d449095bf
13 changed files with 190 additions and 39 deletions

View File

@@ -4,6 +4,7 @@
#include <Nazara/VulkanRenderer/VulkanDevice.hpp>
#include <Nazara/VulkanRenderer/VulkanRenderPipeline.hpp>
#include <Nazara/VulkanRenderer/VulkanShaderStage.hpp>
#include <Nazara/VulkanRenderer/Debug.hpp>
namespace Nz
@@ -19,4 +20,13 @@ namespace Nz
{
return std::make_unique<VulkanRenderPipeline>(shared_from_this(), std::move(pipelineInfo));
}
std::shared_ptr<ShaderStageImpl> VulkanDevice::InstantiateShaderStage(ShaderStageType type, ShaderLanguage lang, const void* source, std::size_t sourceSize)
{
auto stage = std::make_shared<VulkanShaderStage>();
if (!stage->Create(shared_from_this(), type, lang, source, sourceSize))
return {};
return stage;
}
}