From fd49c76b531cf2086214064de243e09e373f0647 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Sat, 31 Oct 2020 20:13:51 +0800 Subject: [PATCH] update command buffer and default theme engine --- inc/hgl/graph/VKCommandBuffer.h | 8 +++++++- src/GUI/DefaultThemeEngine.cpp | 2 +- src/GUI/DefaultThemeEngine.h | 2 +- src/GUI/DefaultThemeForm.cpp | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/inc/hgl/graph/VKCommandBuffer.h b/inc/hgl/graph/VKCommandBuffer.h index a38647cf..d95387c8 100644 --- a/inc/hgl/graph/VKCommandBuffer.h +++ b/inc/hgl/graph/VKCommandBuffer.h @@ -99,12 +99,18 @@ public: return(true); } + bool PushDescriptorSet(VkPipelineLayout pipeline_layout,uint32_t set,uint32_t count,const VkWriteDescriptorSet *write_desc_set) + { + vkCmdPushDescriptorSetKHR(cmd_buf,VK_PIPELINE_BIND_POINT_GRAPHICS,pipeline_layout,set,count,write_desc_set); + } + void PushConstants(ShaderStageBit shader_stage_bit,uint32_t offset,uint32_t size,const void *pValues) { vkCmdPushConstants(cmd_buf,pipeline_layout,(VkShaderStageFlagBits)shader_stage_bit,offset,size,pValues); } - void PushConstants(const void *data,const uint32_t size){vkCmdPushConstants(cmd_buf,pipeline_layout,VK_SHADER_STAGE_VERTEX_BIT,0,size,data);} + void PushConstants(const void *data,const uint32_t size) {vkCmdPushConstants(cmd_buf,pipeline_layout,VK_SHADER_STAGE_VERTEX_BIT,0, size,data);} + void PushConstants(const void *data,const uint32_t offset,const uint32_t size) {vkCmdPushConstants(cmd_buf,pipeline_layout,VK_SHADER_STAGE_VERTEX_BIT,offset, size,data);} bool BindVAB(RenderableInstance *); diff --git a/src/GUI/DefaultThemeEngine.cpp b/src/GUI/DefaultThemeEngine.cpp index 7e08b9b3..5a23e242 100644 --- a/src/GUI/DefaultThemeEngine.cpp +++ b/src/GUI/DefaultThemeEngine.cpp @@ -23,4 +23,4 @@ namespace hgl return(new DefaultThemeForm(f,rt,rc)); } }//namespace gui -}//namespace hgl \ No newline at end of file +}//namespace hgl diff --git a/src/GUI/DefaultThemeEngine.h b/src/GUI/DefaultThemeEngine.h index 807998ea..2b58c68b 100644 --- a/src/GUI/DefaultThemeEngine.h +++ b/src/GUI/DefaultThemeEngine.h @@ -3,7 +3,7 @@ #include #include #include -#include"DTForm.h" +#include"DefaultThemeForm.h" namespace hgl { diff --git a/src/GUI/DefaultThemeForm.cpp b/src/GUI/DefaultThemeForm.cpp index 997df388..c60f522b 100644 --- a/src/GUI/DefaultThemeForm.cpp +++ b/src/GUI/DefaultThemeForm.cpp @@ -11,7 +11,7 @@ namespace hgl if(!cmd_buf->BeginRenderPass()) return(false); - + cmd_buf->EndRenderPass(); return(true);