diff --git a/example/Vulkan/VKShaderModuleManage.cpp b/example/Vulkan/VKShaderModuleManage.cpp index 09eabaae..a706e257 100644 --- a/example/Vulkan/VKShaderModuleManage.cpp +++ b/example/Vulkan/VKShaderModuleManage.cpp @@ -6,6 +6,23 @@ #include"VKShaderParse.h" VK_NAMESPACE_BEGIN +ShaderModuleManage::~ShaderModuleManage() +{ + const int count=shader_list.GetCount(); + + if(count>0) + { + auto **p=shader_list.GetDataList(); + + for(int i=0;iright; + + ++p; + } + } +} + const ShaderModule *ShaderModuleManage::CreateShader(const VkShaderStageFlagBits shader_stage_bit,const void *spv_data,const uint32_t spv_size) { VkPipelineShaderStageCreateInfo *shader_stage=new VkPipelineShaderStageCreateInfo; @@ -85,7 +102,7 @@ bool ShaderModuleManage::ReleaseShader(const ShaderModule *const_sm) return(true); } -const Material *ShaderModuleManage::CreateMaterial(const VertexShaderModule *vertex_shader_module,const ShaderModule *fragment_shader_module)const +Material *ShaderModuleManage::CreateMaterial(const VertexShaderModule *vertex_shader_module,const ShaderModule *fragment_shader_module)const { if(!vertex_shader_module||!fragment_shader_module) return(nullptr); diff --git a/example/Vulkan/VKShaderModuleManage.h b/example/Vulkan/VKShaderModuleManage.h index 95aafd44..6813b016 100644 --- a/example/Vulkan/VKShaderModuleManage.h +++ b/example/Vulkan/VKShaderModuleManage.h @@ -58,8 +58,8 @@ public: const ShaderModule *GetShader (int); bool ReleaseShader (const ShaderModule *); - const Material * CreateMaterial(const VertexShaderModule *vertex_shader_module,const ShaderModule *fragment_shader_module)const; - const Material * CreateMaterial(const UTF8String &vertex_shader_filename,const UTF8String &fragment_shader_filename) + Material * CreateMaterial(const VertexShaderModule *vertex_shader_module,const ShaderModule *fragment_shader_module)const; + Material * CreateMaterial(const UTF8String &vertex_shader_filename,const UTF8String &fragment_shader_filename) { const ShaderModule *vs=CreateShader(VK_SHADER_STAGE_VERTEX_BIT,vertex_shader_filename);