From 1394616d9c87114d5c84b1deb6d75a58dc82d504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Mathisen?= Date: Thu, 10 Mar 2016 12:30:38 +0100 Subject: [PATCH] Vulkan Example: Some code layout changes. --- .../vulkan_example/imgui_impl_glfw_vulkan.cpp | 63 +++++++++---------- 1 file changed, 28 insertions(+), 35 deletions(-) diff --git a/examples/vulkan_example/imgui_impl_glfw_vulkan.cpp b/examples/vulkan_example/imgui_impl_glfw_vulkan.cpp index ae479056..4774f173 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;