![]() |
Fling Engine
0.00.1
Fling Engine is a game engine written in Vulkan
|
Class that represents what a shader is in the Fling engine. More...
#include <Shader.h>
Inherits Fling::Resource.
Public Member Functions | |
| Shader (Guid t_ID, LogicalDevice *t_Dev) | |
| Construct a new Shader object. More... | |
| ~Shader () | |
| VkShaderModule | GetShaderModule () const |
| Create a Shader Module object. More... | |
| VkShaderStageFlagBits | GetStage () const |
| get the Vulkan stage bit flags that we should bind to More... | |
| void | Release () |
| Release any resrources created by this shader (the module) More... | |
Public Member Functions inherited from Fling::Resource | |
| Resource (Fling::Guid t_ID) | |
| virtual | ~Resource ()=default |
| Fling::Guid_Handle | GetGuidHandle () const |
| Get GUID handle (just an int) for this resources guid. More... | |
| const std::string & | GetGuidString () const |
| Get the human-readable string representation of this GUID. More... | |
| std::string | GetFilepathReleativeToAssets () const |
| Returns the full file path that is relative to the assets path based on the GUID of this resource. More... | |
Static Public Member Functions | |
| static std::shared_ptr< Fling::Shader > | Create (Guid t_ID, LogicalDevice *t_Dev) |
| static VkDescriptorSetLayout | CreateSetLayout (VkDevice t_Dev, std::vector< Shader *> &t_Shaders, bool t_SupportPushDescriptor=false) |
| static VkPipelineLayout | CreatePipelineLayout (VkDevice t_Dev, VkDescriptorSetLayout t_SetLayout, VkShaderStageFlags t_PushConstantStages, size_t t_PushConstantSize) |
Private Member Functions | |
| void | ParseReflectionData (const UINT32 *t_Code, UINT32 t_Size) |
| Compiles this shader with SPRIV-Cross. More... | |
| VkResult | CreateShaderModule (std::vector< char > &t_ShaderCode) |
| Creates the shader modules. More... | |
Static Private Member Functions | |
| static UINT32 | GatherResources (const std::vector< Shader *> &t_Shaders, VkDescriptorType(&t_ResourceTypes)[32]) |
| static std::vector< char > | LoadRawBytes (const std::string &t_FilePath) |
| Load the raw shader code in off-disk. More... | |
Private Attributes | |
| VkShaderModule | m_Module = VK_NULL_HANDLE |
| The shader module created by this shader. More... | |
| UINT32 | m_ResourceMask {} |
| VkDescriptorType | m_ResourceTypes [32] {} |
| The types of descriptors that are used by this shader. More... | |
| VkShaderStageFlagBits | m_Stage = VkShaderStageFlagBits::VK_SHADER_STAGE_VERTEX_BIT |
| The stage in the pipeline that this shader is in. More... | |
| const LogicalDevice * | m_Device |
| bool | m_UsesPushConstants = false |
| UINT32 | localSizeX {} |
| UINT32 | localSizeY {} |
| UINT32 | localSizeZ {} |
Friends | |
| class | ResourceManager |
Additional Inherited Members | |
Protected Attributes inherited from Fling::Resource | |
| Fling::Guid | m_Guid |
| std::string | m_HumanReadableName |
Class that represents what a shader is in the Fling engine.
Performs shader reflection and provides some helper functionality for creating the Vk resources needed(descriptor sets, bindings, and locations)
|
explicit |
Construct a new Shader object.
Loads from disk and compiles the shader
| t_ID | The GUID that represents the file path to this file. |
| Fling::Shader::~Shader | ( | ) |
|
static |
|
static |
|
static |
|
private |
Creates the shader modules.
|
staticprivate |
|
inline |
Create a Shader Module object.
|
inline |
get the Vulkan stage bit flags that we should bind to
|
staticprivate |
Load the raw shader code in off-disk.
Compiles this shader with SPRIV-Cross.
| void Fling::Shader::Release | ( | ) |
Release any resrources created by this shader (the module)
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
The shader module created by this shader.
|
private |
|
private |
The types of descriptors that are used by this shader.
|
private |
The stage in the pipeline that this shader is in.
|
private |
1.8.13