diff --git a/examples/vulkan_example/imgui_impl_glfw_vulkan.cpp b/examples/vulkan_example/imgui_impl_glfw_vulkan.cpp index ae4790563..4774f173f 100644 --- a/examples/vulkan_example/imgui_impl_glfw_vulkan.cpp +++ b/examples/vulkan_example/imgui_impl_glfw_vulkan.cpp @@ -228,7 +228,7 @@ static uint32_t ImGui_ImplGlfwVulkan_MemoryType(VkMemoryPropertyFlags properties if((prop.memoryTypes[i].propertyFlags & properties) == properties && type_bits & (1<TexID = (void *)(intptr_t)g_FontImage; @@ -685,7 +679,6 @@ bool ImGui_ImplGlfwVulkan_CreateDeviceObjects() err = vkCreateShaderModule(g_Device, &frag_info, g_Allocator, &frag_module); ImGui_ImplGlfwVulkan_VkResult(err); } - if(!g_FontSampler){ VkSamplerCreateInfo info = {}; info.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO; @@ -703,7 +696,6 @@ bool ImGui_ImplGlfwVulkan_CreateDeviceObjects() &g_FontSampler); ImGui_ImplGlfwVulkan_VkResult(err); } - if(!g_DescriptorSetLayout){ VkSampler sampler[1] = {g_FontSampler}; VkDescriptorSetLayoutBinding binding[1] = {}; @@ -721,6 +713,7 @@ bool ImGui_ImplGlfwVulkan_CreateDeviceObjects() &g_DescriptorSetLayout); ImGui_ImplGlfwVulkan_VkResult(err); } + // Create Descriptor Set: { VkDescriptorSetAllocateInfo alloc_info = {}; alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO;