Hymn to Beauty
C++ 3D Engine
VulkanShader.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "../Interface/Shader.hpp"
4
5#include <vulkan/vulkan.h>
6#include <ShaderProcessor/ShaderSource.hpp>
7
8namespace Video {
9
11class VulkanShader : public Shader {
12 public:
14
19 VulkanShader(VkDevice device, const ShaderSource& shaderSource, Type type);
20
22 ~VulkanShader() final;
23
25
28 VkShaderModule GetShaderModule() const;
29
31
34 VkShaderStageFlagBits GetShaderStage() const;
35
37
40 const ShaderSource::ReflectionInfo& GetReflectionInfo() const;
41
42 private:
43 VulkanShader(const VulkanShader& other) = delete;
44
45 VkDevice device;
46 VkShaderModule shaderModule;
47 VkShaderStageFlagBits shaderStage;
48
49 ShaderSource::ReflectionInfo reflectionInfo;
50};
51
52}
Compiles and handles a shader. Shaders should be linked together into a ShaderProgram.
Definition: Shader.hpp:8
Type
The type of shader.
Definition: Shader.hpp:11
Vulkan implementation of Shader.
Definition: VulkanShader.hpp:11
VkShaderStageFlagBits GetShaderStage() const
Get the shader stage.
Definition: VulkanShader.cpp:47
VulkanShader(VkDevice device, const ShaderSource &shaderSource, Type type)
Create new Vulkan shader.
Definition: VulkanShader.cpp:8
VkShaderModule GetShaderModule() const
Get the Vulkan shader module.
Definition: VulkanShader.cpp:43
const ShaderSource::ReflectionInfo & GetReflectionInfo() const
Get reflection info.
Definition: VulkanShader.cpp:51
~VulkanShader() final
Destructor.
Definition: VulkanShader.cpp:39
Definition: Editor.hpp:18