2
3
4
5
9#include "Render/Renderer/Renderer.h"
22
23
24
30
31
32
33
34
35
36
37
39 const std::string& rendererName ,
45 :
Renderer(rendererName
, vulkanState
, descriptorPool
, device
, rendererResourcePool
, true)
50
51
55
56
57
58
64
65
66
70
71
72
76
77
78
82
83
87
88
89
90
91
92
95 VkPipelineLayout& layout ,
100
101
102
103
104
105
106
108 const std::string& pipelineName ,
109 const std::string& materialName ,
110 VkPipelineLayout& layout ,
118
119
#define SPICES_PROFILE_ZONEN(...)
#define SPICES_PROFILE_ZONE
virtual void CreatePipeline(std::shared_ptr< Material > material, VkPipelineLayout &layout, std::shared_ptr< RendererSubPass > subPass) override
The interface is inherited from Renderer. Create Material Specific Pipeline.
virtual ~BasePassRenderer() override=default
Destructor Function.
virtual void CreateRendererPass() override
The interface is inherited from Renderer. Create Specific Renderer pass.
virtual void CreateDescriptorSet() override
The interface is inherited from Renderer. Create specific descriptor set for sub pass.
virtual void CreateDeviceGeneratedCommandsPipeline(const std::string &pipelineName, const std::string &materialName, VkPipelineLayout &layout, std::shared_ptr< RendererSubPass > subPass, VulkanDeviceGeneratedCommandsNV *indirectPtr) override
Create device generated command Pipeline.
BasePassRenderer(const std::string &rendererName, VulkanState &vulkanState, const std::shared_ptr< VulkanDescriptorPool > &descriptorPool, const std::shared_ptr< VulkanDevice > &device, const std::shared_ptr< RendererResourcePool > &rendererResourcePool)
Constructor Function. Init member variables.
virtual void CreateDeviceGeneratedCommandsLayout() override
This interface is called during OnSystemInitialize(). Create Device Generated Commands Layout.
virtual void OnMeshAddedWorld() override
std::shared_ptr< std::vector< uint32_t > > m_View
World entities view.
virtual void Render(TimeStep &ts, FrameInfo &frameInfo) override
The interface is inherited from Renderer.
BasePassRenderer Class. This class defines the base pass render behaves.
uint32_t m_FrameIndex
FrameIndex, varying during 0 - (MaxFrameInFlight - 1). Used almost anywhere.
static FrameInfo & Get()
Get FrameInfo.
RendererType m_RendererType
The renderer type of current world.
uint32_t m_ImageIndex
ImageIndex, varying during 0 - (MaxFrameInFlight - 1). Used in swapchain index and framebuffer index.
FrameInfo Class. This class defines the FrameInfo data.
Material Class. This class contains a branch of parameter and shader, also descriptor.
MeshComponent Class. This class defines the specific behaves of MeshComponent.
RendererResourcePool Class. This class is a pool of all framebuffer's attachment.
This Class Combines some data relative to sub pass. Usually as a member variable of RendererPass.
DGCLayoutBuilder & AddDrawMeshTaskInput()
Add Draw Mesh Task Command to Input.
DGCLayoutBuilder & AddShaderGroupInput()
Add Binding Shader Group Command to Input.
void Build() const
Create GDC Layout.
DGCLayoutBuilder & AddPushConstantInput()
Add Binding PushConstant Command to Input.
DescriptorSetBuilder & AddPushConstant(uint32_t size)
Set VkPushConstantRange by a specific push constant struct.
virtual void BeginNextSubPass(const std::string &subPassName)
End a preview sub pass and stat next sub pass.
void Await(std::function< void(const VkCommandBuffer &cmdBuffer)> func) const
Await Async Commands.
void BeginRenderPassAsync()
Begin this Renderer's RenderPass Async.
virtual void EndRenderPass()
End this Renderer's RenderPass.
This class helps to bind pipeline and bind buffer. Only instanced during Render().
virtual void OnMeshAddedWorld()
Renderer(const std::string &rendererName, VulkanState &vulkanState, const std::shared_ptr< VulkanDescriptorPool > &DescriptorPool, const std::shared_ptr< VulkanDevice > &device, const std::shared_ptr< RendererResourcePool > &rendererResourcePool, bool isLoadDefaultMaterial=true)
Constructor Function. Init member variables.
VulkanState & m_VulkanState
This variable is passed while renderer instanced.
Renderer Class. This class defines the basic behaves of renderer. When we add an new Renderer,...
SkyBoxComponent Class. This class defines the specific behaves of SkyBoxComponent.
This Class handles our engine time step during frames. Global Unique.
VulkanDescriptorPool Class. This class is the wrapper of VkDescriptorPool.
VulkanDeviceGeneratedCommandsNV Class. This class defines the VulkanDeviceGeneratedCommandsNV behaves...
VulkanInstance Class. This class defines the VulkanDevice behave. This class is just a wrapper of vkd...
constexpr bool m_IsUseDGC
Use DGC or not.
std::vector< SpicesShader::MeshDesc > descs
This struct contains all Vulkan object in used global.