Redo of render paths
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user