SpiecsEngine
 
Loading...
Searching...
No Matches
ShaderLoader.h
Go to the documentation of this file.
1/**
2* @file ShaderLoader.h.
3* @brief The ShaderLoader Class Definitions.
4* @author Spices.
5*/
6
7#pragma once
8#include "Core/Core.h"
9#include "Resources/Shader/ShaderHelper.h"
10
11namespace Spices {
12
13 /**
14 * @brief Forward declare.
15 */
16 class Shader;
17
18 /**
19 * @brief ShaderLoader Class.
20 * This class only defines static function for load data from shader file.
21 */
23 {
24 public:
25
26 /**
27 * @brief Public called API, it is entrance.
28 * @param[in] fileName Shader name.
29 * @param[in] stage ShaderStage.
30 * @param[in,out] outShader Shader pointer, only pass this to it.
31 * Feel free for using row pointer here, it's very safe, for this API only called during Shader.
32 * @return Returns true if load data successfully.
33 */
34 static bool Load(const std::string& fileName, ShaderStage stage, Shader* outShader);
35 };
36}
#define SPICES_PROFILE_ZONEN(...)
#define SPICES_PROFILE_ZONE
#define VK_CHECK(expr)
Vulkan Check macro. Verify Vulkan API Effectiveness.
Definition VulkanUtils.h:68
static bool Load(const std::string &fileName, ShaderStage stage, Shader *outShader)
Public called API, it is entrance.
ShaderLoader Class. This class only defines static function for load data from shader file.
std::shared_ptr< VulkanShaderModule > & GetShaderModule()
Get VulkanShaderModule.
Definition Shader.h:55
ShaderStage m_ShaderStage
Shader stage.
Definition Shader.h:67
std::shared_ptr< VulkanShaderModule > m_ShaderModule
VulkanShaderModule.
Definition Shader.h:72
Shader(const std::string &name, ShaderStage stage)
Constructor Function.
Definition Shader.cpp:12
Shader(const std::string &name, const std::string &stage)
Constructor Function.
Definition Shader.cpp:24
virtual ~Shader()=default
Destructor Function.
Shader()=default
Constructor Function.
std::string m_ShaderName
Shader name.
Definition Shader.h:62
void Deserialize()
Deserialize the data from a disk file to this class.
Definition Shader.cpp:36
Shader Class.
Definition Shader.h:19
VulkanComputePipeline(VulkanState &vulkanState, const std::string &pipelineName, const ShaderMap &shaders, const PipelineConfigInfo &config)
Constructor Function. Create VkPipeline.
This class is a wrapper of Compute Pipeline.
VulkanIndirectMeshPipelineNV(VulkanState &vulkanState, const std::string &pipelineName, const std::string &materialName, const std::vector< VkPipeline > &pipelineRef, const PipelineConfigInfo &config)
Constructor Function. Create VkPipeline.
This class is a wrapper of Indirect Mesh Pipeline.
VulkanIndirectPipelineNV(VulkanState &vulkanState, const std::string &pipelineName, const std::string &materialName, const std::vector< VkPipeline > &pipelineRef, const PipelineConfigInfo &config)
Constructor Function. Create VkPipeline.
This class is a wrapper of Indirect Pipeline.
VulkanMeshPipeline(VulkanState &vulkanState, const std::string &pipelineName, const ShaderMap &shaders, const PipelineConfigInfo &config)
Constructor Function. Create VkPipeline.
This class is a wrapper of Mesh Pipeline.
VulkanObject(VulkanState &vulkanState)
Constructor Function. Init member variables.
VulkanObject Class. This class defines the basic behaves of VulkanObject. When we create an new Vulka...
VulkanPipeline(VulkanState &vulkanState)
Constructor Function.
virtual ~VulkanPipeline() override
Destructor Function.
static void DefaultPipelineConfigInfo(PipelineConfigInfo &configInfo)
Create a PipelineConfigInfo with default parameter.
VulkanPipeline(VulkanState &vulkanState, const std::string &pipelineName, const ShaderMap &shaders, const PipelineConfigInfo &config)
Constructor Function. Create VkPipeline.
This class is a wrapper of VkPipelineLayout and VkPipeline.
VulkanRayTracingPipeline(VulkanState &vulkanState, const std::string &pipelineName, const ShaderMap &shaders, const PipelineConfigInfo &config)
Constructor Function. Create VkPipeline.
This class is a wrapper of RayTracing Pipeline.
This Class is a Wrapper of VkShaderModule.
ShaderStage
enum of shader stage.
This struct included all infos usd to create a VkPipeline.
This struct contains all Vulkan object in used global.
Definition VulkanUtils.h:74