SlateRenderer Class. This class defines the imgui render behaves. More...
#include <SlateRenderer.h>
Public Member Functions | |
| SlateRenderer (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 | ~SlateRenderer () override |
| Destructor Function. | |
| virtual void | Render (TimeStep &ts, FrameInfo &frameInfo) override |
| The interface is inherited from Renderer. | |
| virtual void | OnSlateResize () |
| virtual void | OnMeshAddedWorld () |
| void | RegistryMaterial (const std::string &materialName, const std::string &subPassName) |
| Registry material to Specific Renderer. | |
| void | RegistryDGCPipeline (const std::string &materialName, const std::string &subPassName, VulkanDeviceGeneratedCommandsNV *indirectPtr) |
| Registry dgc pipeline to Specific Renderer. | |
| template<typename T > | |
| std::shared_ptr< VulkanDeviceGeneratedCommandsNV > | FillIndirectRenderData (const std::string &subPassName, std::shared_ptr< std::vector< uint32_t > > view) |
| Fill in World RenderAble data to IndirectBuffer. | |
| template<typename T > | |
| std::shared_ptr< std::vector< uint32_t > > | GetEntityWithComponent (World *world) |
| Get entities with component in world. | |
| std::shared_ptr< RendererPass > & | GetPasses () |
| Get RendererPass. | |
| std::shared_ptr< Material > | GetDefaultMaterial (const std::string &subPassName) const |
| Get default material using sub pass Name. | |
| template<typename F > | |
| void | IterStatistics (F &&func) |
| Iterator the specific RenderPass Statistics in Renderer. | |
| void | ResetRendererState () |
| Reset Renderer State to disActive. | |
Static Public Member Functions | |
| static std::shared_ptr< VulkanPipeline > | GetPipeline (const std::string &name) |
| Get slate material pipeline. | |
Static Public Attributes | |
| static std::shared_ptr< scl::behave_state_list< void, Renderer::RenderBehaveBuilder *, VkCommandBuffer > > | m_StatisticsStateList |
| Statistics StateList. | |
Protected Member Functions | |
| virtual void | CreateDeviceGeneratedCommandsLayout () |
| This interface is called during OnSystemInitialize(). Create Device Generated Commands Layout. | |
| void | CreateDefaultMaterial () |
| Create Specific Renderer Default Material. | |
| void | CreateDGCMaterial (const std::string &subPass, VulkanDeviceGeneratedCommandsNV *indirectPtr) |
| Create Specific Renderer DGC Material. | |
| VkPipelineLayout | CreatePipelineLayout (const std::vector< VkDescriptorSetLayout > &rowSetLayouts, const std::shared_ptr< RendererSubPass > &subPass) const |
| Create Pipeline Layout with material's descriptorset and renderer's descriptor set. | |
| virtual void | CreateDeviceGeneratedCommandsPipeline (const std::string &pipelineName, const std::string &materialName, VkPipelineLayout &layout, std::shared_ptr< RendererSubPass > subPass, VulkanDeviceGeneratedCommandsNV *indirectPtr) |
| Create device generated command Pipeline. | |
| template<typename F > | |
| std::future< VkCommandBuffer > | SubmitCmdsParallel (VkCommandBuffer primaryCmdBuffer, uint32_t subPass, F &&func) |
| Submit a group of commands to secondary command buffer, and execute all of them. | |
| template<typename T , typename F > | |
| void | IterWorldComp (FrameInfo &frameInfo, F func) |
| Iterator the specific Component in World. | |
| template<typename T , typename F > | |
| void | IterWorldCompWithBreak (FrameInfo &frameInfo, F func) |
| Iterator the specific Component in World With break. | |
| template<typename T , typename F > | |
| void | IterWorldCompWithRange (FrameInfo &frameInfo, const std::vector< uint32_t > &ranges, F func) |
| Iterator the specific Component in World With range. | |
| template<typename T , typename F > | |
| void | IterWorldCompWithRange (FrameInfo &frameInfo, const std::vector< uint32_t > &ranges, uint32_t floor, uint32_t ceil, F func) |
| Iterator the specific Component in World With range. | |
| template<typename T , typename F > | |
| void | IterWorldCompWithBreakWithRange (FrameInfo &frameInfo, const std::vector< uint32_t > &ranges, F func) |
| Iterator the specific Component in World With break With range. | |
| template<typename T , typename F > | |
| void | IterWorldCompWithBreakWithRange (FrameInfo &frameInfo, const std::vector< uint32_t > &ranges, uint32_t floor, uint32_t ceil, F func) |
| Iterator the specific Component in World With break With range. | |
| std::tuple< glm::mat4, glm::mat4, unsigned int, float > | GetActiveCameraMatrix (FrameInfo &frameInfo) |
| Get The activated camera entity's view matrix and projection matrix. | |
| void | GetDirectionalLight (FrameInfo &frameInfo, std::array< SpicesShader::DirectionalLight, SpicesShader::DIRECTIONALLIGHT_BUFFER_MAXNUM > &dLightBuffer) |
| Get DirectionalLightComponent's render data in World. | |
| void | GetDirectionalLightMatrix (FrameInfo &frameInfo, std::array< glm::mat4, MAX_DIRECTIONALLIGHT_NUM > &directionalLight) |
| void | GetPointLight (FrameInfo &frameInfo, std::array< SpicesShader::PointLight, SpicesShader::POINTLIGHT_BUFFER_MAXNUM > &pLightBuffer) |
| Get PointLightComponent's render data in World. | |
Protected Attributes | |
| VulkanState & | m_VulkanState |
| This variable is passed while renderer instanced. | |
| std::shared_ptr< VulkanDescriptorPool > | m_DescriptorPool |
| This variable is passed while renderer instanced. | |
| std::shared_ptr< VulkanDevice > | m_Device |
| VulkanDevice , Passed by instanced. | |
| std::shared_ptr< RendererResourcePool > | m_RendererResourcePool |
| RendererResourcePool, Passed by instanced. | |
| std::shared_ptr< RendererPass > | m_Pass |
| RendererPass. | |
| std::string | m_RendererName |
| Specific renderer name, Passed by instanced. | |
| scl::thread_unordered_map< std::string, std::shared_ptr< VulkanPipeline > > | m_Pipelines |
| Renderer stored material pipelines. | |
| DescriptorSetManager::DescriptorSetCombineFlags | m_DescriptorSetCombine |
| Combination of DescriptorSet. | |
| bool | m_IsLoadDefaultMaterial |
| Whether should load a default renderer material. | |
| bool | m_IsActive |
| Whether this renderer is active(submit commands in RendererBehaveBuilder). | |
| std::unordered_map< std::string, std::shared_ptr< VulkanDeviceGeneratedCommandsNV > > | m_DGCData |
| Data of dgc DGC Draw. | |
| std::shared_ptr< RendererCache > | m_RenderCache |
| RendererCache. | |
Private Member Functions | |
| virtual void | CreateRendererPass () override |
| The interface is inherited from Renderer. Create specific render pass. | |
| virtual void | CreateDescriptorSet () override |
| The interface is inherited from Renderer. Create specific descriptor set for sub pass. | |
| 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 void | OnSystemInitialize () override |
| Rewrite Renderer OnSystemInitialize to add other code. | |
| virtual void | OnWindowResizeOver () override |
| This interface is called on Window resized over (registry by swapchain). If the specific renderer uses swapchain image attachment during CreateRenderPass(), this interface needs to override, callOnSlateResize here just will be fine. | |
| void | InitImgui () const |
| Init Imgui. | |
| void | ShutdownImgui () |
| Shutdown Imgui. | |
| void | BeginImguiFrame () |
| Begin Imgui frame. | |
| void | EndImguiFrame (uint32_t index) const |
| End Imgui frame. | |
| void | EndImguiFrameAsync (uint32_t index) |
| End Imgui frame. | |
SlateRenderer Class. This class defines the imgui render behaves.
Definition at line 17 of file SlateRenderer.h.