Redo of render paths

This commit is contained in:
Dynamitos
2020-06-02 11:46:18 +02:00
parent bb5b48698a
commit 356e6058fe
121 changed files with 3890 additions and 572 deletions
+11 -3
View File
@@ -6,13 +6,16 @@ namespace Seele
{
namespace Vulkan
{
DECLARE_REF(Graphics);
DECLARE_REF(DescriptorLayout);
class Shader
{
public:
Shader(PGraphics graphics, ShaderType shaderType, VkShaderStageFlags stage);
virtual ~Shader();
void create(const ShaderCreateInfo& createInfo);
VkShaderModule getModuleHandle() const
{
return module;
@@ -21,18 +24,23 @@ public:
{
return entryPointName.c_str();
}
Map<uint32, PDescriptorLayout> getDescriptorLayouts();
private:
PGraphics graphics;
Map<uint32, PDescriptorLayout> descriptorSets;
VkShaderModule module;
VkShaderStageFlags stage;
ShaderType type;
std::string entryPointName;
};
DEFINE_REF(Shader);
template <typename Base, ShaderType shaderType, VkShaderStageFlags stage>
template <typename Base, ShaderType shaderType, VkShaderStageFlags stageFlags>
class ShaderBase : public Base, public Shader
{
public:
ShaderBase(PGraphics graphics)
: Shader(graphics, shaderType, stage)
: Shader(graphics, shaderType, stageFlags)
{
}
virtual ~ShaderBase()