Renderer: Replace ShaderStage by ShaderModule (a module can handle multiple stages)
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
namespace Nz
|
||||
{
|
||||
class CommandPool;
|
||||
class ShaderStage;
|
||||
class ShaderModule;
|
||||
|
||||
class NAZARA_RENDERER_API RenderDevice
|
||||
{
|
||||
@@ -39,9 +39,9 @@ namespace Nz
|
||||
virtual std::shared_ptr<RenderPass> InstantiateRenderPass(std::vector<RenderPass::Attachment> attachments, std::vector<RenderPass::SubpassDescription> subpassDescriptions, std::vector<RenderPass::SubpassDependency> subpassDependencies) = 0;
|
||||
virtual std::shared_ptr<RenderPipeline> InstantiateRenderPipeline(RenderPipelineInfo pipelineInfo) = 0;
|
||||
virtual std::shared_ptr<RenderPipelineLayout> InstantiateRenderPipelineLayout(RenderPipelineLayoutInfo pipelineLayoutInfo) = 0;
|
||||
virtual std::shared_ptr<ShaderStage> InstantiateShaderStage(const ShaderAst::StatementPtr& shaderAst, const ShaderWriter::States& states) = 0;
|
||||
virtual std::shared_ptr<ShaderStage> InstantiateShaderStage(ShaderStageType type, ShaderLanguage lang, const void* source, std::size_t sourceSize) = 0;
|
||||
std::shared_ptr<ShaderStage> InstantiateShaderStage(ShaderStageType type, ShaderLanguage lang, const std::filesystem::path& sourcePath);
|
||||
virtual std::shared_ptr<ShaderModule> InstantiateShaderModule(ShaderStageTypeFlags shaderStages, ShaderAst::StatementPtr& shaderAst, const ShaderWriter::States& states) = 0;
|
||||
virtual std::shared_ptr<ShaderModule> InstantiateShaderModule(ShaderStageTypeFlags shaderStages, ShaderLanguage lang, const void* source, std::size_t sourceSize) = 0;
|
||||
std::shared_ptr<ShaderModule> InstantiateShaderModule(ShaderStageTypeFlags shaderStages, ShaderLanguage lang, const std::filesystem::path& sourcePath);
|
||||
virtual std::shared_ptr<Texture> InstantiateTexture(const TextureInfo& params) = 0;
|
||||
virtual std::shared_ptr<TextureSampler> InstantiateTextureSampler(const TextureSamplerInfo& params) = 0;
|
||||
};
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Nz
|
||||
};
|
||||
|
||||
std::shared_ptr<RenderPipelineLayout> pipelineLayout;
|
||||
std::vector<std::shared_ptr<ShaderStage>> shaderStages;
|
||||
std::vector<std::shared_ptr<ShaderModule>> shaderModules;
|
||||
std::vector<VertexBufferData> vertexBuffers;
|
||||
};
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
class ShaderStage;
|
||||
class ShaderModule;
|
||||
|
||||
struct RenderStates
|
||||
{
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef NAZARA_RENDERER_SHADERSTAGE_HPP
|
||||
#define NAZARA_RENDERER_SHADERSTAGE_HPP
|
||||
#ifndef NAZARA_RENDERER_SHADERMODULE_HPP
|
||||
#define NAZARA_RENDERER_SHADERMODULE_HPP
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Renderer/Config.hpp>
|
||||
@@ -13,11 +13,11 @@
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
class NAZARA_RENDERER_API ShaderStage
|
||||
class NAZARA_RENDERER_API ShaderModule
|
||||
{
|
||||
public:
|
||||
ShaderStage() = default;
|
||||
virtual ~ShaderStage();
|
||||
ShaderModule() = default;
|
||||
virtual ~ShaderModule();
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user