mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-28 00:39:02 +08:00
Examples: Vulkan: Fixed tabs->space, removed extraneous braces and empty lines. (#2071)
This commit is contained in:
parent
b88a3b2711
commit
c7eef99a33
@ -23,7 +23,7 @@
|
|||||||
#define IMGUI_VULKAN_DEBUG_REPORT
|
#define IMGUI_VULKAN_DEBUG_REPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static uint32_t g_MinImageCount = 2;
|
static uint32_t g_MinImageCount = 2;
|
||||||
static VkAllocationCallbacks* g_Allocator = NULL;
|
static VkAllocationCallbacks* g_Allocator = NULL;
|
||||||
static VkInstance g_Instance = VK_NULL_HANDLE;
|
static VkInstance g_Instance = VK_NULL_HANDLE;
|
||||||
static VkPhysicalDevice g_PhysicalDevice = VK_NULL_HANDLE;
|
static VkPhysicalDevice g_PhysicalDevice = VK_NULL_HANDLE;
|
||||||
@ -213,7 +213,7 @@ static void SetupVulkanWindowData(ImGui_ImplVulkanH_WindowData* wd, VkSurfaceKHR
|
|||||||
|
|
||||||
// Create SwapChain, RenderPass, Framebuffer, etc.
|
// Create SwapChain, RenderPass, Framebuffer, etc.
|
||||||
ImGui_ImplVulkanH_CreateWindowDataSwapChainAndFramebuffer(g_PhysicalDevice, g_Device, wd, g_Allocator, width, height, g_MinImageCount);
|
ImGui_ImplVulkanH_CreateWindowDataSwapChainAndFramebuffer(g_PhysicalDevice, g_Device, wd, g_Allocator, width, height, g_MinImageCount);
|
||||||
ImGui_ImplVulkanH_CreateWindowDataCommandBuffers(g_PhysicalDevice, g_Device, g_QueueFamily, wd, g_Allocator);
|
ImGui_ImplVulkanH_CreateWindowDataCommandBuffers(g_PhysicalDevice, g_Device, g_QueueFamily, wd, g_Allocator);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void CleanupVulkan()
|
static void CleanupVulkan()
|
||||||
@ -374,7 +374,7 @@ int main(int, char**)
|
|||||||
init_info.DescriptorPool = g_DescriptorPool;
|
init_info.DescriptorPool = g_DescriptorPool;
|
||||||
init_info.Allocator = g_Allocator;
|
init_info.Allocator = g_Allocator;
|
||||||
init_info.CheckVkResultFn = check_vk_result;
|
init_info.CheckVkResultFn = check_vk_result;
|
||||||
init_info.QueuedFrames = wd->BackBufferCount;
|
init_info.QueuedFrames = wd->BackBufferCount;
|
||||||
ImGui_ImplVulkan_Init(&init_info, wd->RenderPass);
|
ImGui_ImplVulkan_Init(&init_info, wd->RenderPass);
|
||||||
|
|
||||||
// Load Fonts
|
// Load Fonts
|
||||||
@ -435,14 +435,14 @@ int main(int, char**)
|
|||||||
// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
|
// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
|
||||||
// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
|
// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
|
||||||
glfwPollEvents();
|
glfwPollEvents();
|
||||||
if (g_ResizeWanted)
|
if (g_ResizeWanted)
|
||||||
{
|
{
|
||||||
ImGui_ImplVulkanH_CreateWindowDataSwapChainAndFramebuffer(g_PhysicalDevice, g_Device, &g_WindowData, g_Allocator, g_ResizeWidth, g_ResizeHeight, g_MinImageCount);
|
ImGui_ImplVulkanH_CreateWindowDataSwapChainAndFramebuffer(g_PhysicalDevice, g_Device, &g_WindowData, g_Allocator, g_ResizeWidth, g_ResizeHeight, g_MinImageCount);
|
||||||
ImGui_ImplVulkanH_CreateWindowDataCommandBuffers(g_PhysicalDevice, g_Device, g_QueueFamily, &g_WindowData, g_Allocator);
|
ImGui_ImplVulkanH_CreateWindowDataCommandBuffers(g_PhysicalDevice, g_Device, g_QueueFamily, &g_WindowData, g_Allocator);
|
||||||
ImGui_ImplVulkan_SetQueuedFramesCount(g_WindowData.BackBufferCount);
|
ImGui_ImplVulkan_SetQueuedFramesCount(g_WindowData.BackBufferCount);
|
||||||
g_WindowData.FrameIndex = 0;
|
g_WindowData.FrameIndex = 0;
|
||||||
g_ResizeWanted = false;
|
g_ResizeWanted = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start the Dear ImGui frame
|
// Start the Dear ImGui frame
|
||||||
ImGui_ImplVulkan_NewFrame();
|
ImGui_ImplVulkan_NewFrame();
|
||||||
@ -484,26 +484,26 @@ int main(int, char**)
|
|||||||
if (ImGui::Button("Close Me"))
|
if (ImGui::Button("Close Me"))
|
||||||
show_another_window = false;
|
show_another_window = false;
|
||||||
|
|
||||||
if (ImGui::Button("Increase"))
|
if (ImGui::Button("Increase"))
|
||||||
{
|
{
|
||||||
g_MinImageCount++;
|
g_MinImageCount++;
|
||||||
g_ResizeWanted = true;
|
g_ResizeWanted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if (ImGui::Button("Decrease"))
|
if (ImGui::Button("Decrease"))
|
||||||
{
|
{
|
||||||
if (g_MinImageCount != 2)
|
if (g_MinImageCount != 2)
|
||||||
{
|
{
|
||||||
g_MinImageCount--;
|
g_MinImageCount--;
|
||||||
g_ResizeWanted = true;
|
g_ResizeWanted = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Text("Back Buffers: %i", g_MinImageCount);
|
ImGui::Text("Back Buffers: %i", g_MinImageCount);
|
||||||
|
|
||||||
ImGui::Text("Frame Index %i", wd->FrameIndex);
|
ImGui::Text("Frame Index %i", wd->FrameIndex);
|
||||||
|
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
}
|
}
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
#define IMGUI_VULKAN_DEBUG_REPORT
|
#define IMGUI_VULKAN_DEBUG_REPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static uint32_t g_MinImageCount = 2;
|
static uint32_t g_MinImageCount = 2;
|
||||||
static bool g_PendingSwapchainRebuild = false;
|
static bool g_PendingSwapchainRebuild = false;
|
||||||
static VkAllocationCallbacks* g_Allocator = NULL;
|
static VkAllocationCallbacks* g_Allocator = NULL;
|
||||||
static VkInstance g_Instance = VK_NULL_HANDLE;
|
static VkInstance g_Instance = VK_NULL_HANDLE;
|
||||||
static VkPhysicalDevice g_PhysicalDevice = VK_NULL_HANDLE;
|
static VkPhysicalDevice g_PhysicalDevice = VK_NULL_HANDLE;
|
||||||
@ -204,7 +204,7 @@ static void SetupVulkanWindowData(ImGui_ImplVulkanH_WindowData* wd, VkSurfaceKHR
|
|||||||
|
|
||||||
// Create SwapChain, RenderPass, Framebuffer, etc.
|
// Create SwapChain, RenderPass, Framebuffer, etc.
|
||||||
ImGui_ImplVulkanH_CreateWindowDataSwapChainAndFramebuffer(g_PhysicalDevice, g_Device, wd, g_Allocator, width, height, g_MinImageCount);
|
ImGui_ImplVulkanH_CreateWindowDataSwapChainAndFramebuffer(g_PhysicalDevice, g_Device, wd, g_Allocator, width, height, g_MinImageCount);
|
||||||
ImGui_ImplVulkanH_CreateWindowDataCommandBuffers(g_PhysicalDevice, g_Device, g_QueueFamily, wd, g_Allocator);
|
ImGui_ImplVulkanH_CreateWindowDataCommandBuffers(g_PhysicalDevice, g_Device, g_QueueFamily, wd, g_Allocator);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void CleanupVulkan()
|
static void CleanupVulkan()
|
||||||
@ -300,16 +300,11 @@ static void FramePresent(ImGui_ImplVulkanH_WindowData* wd)
|
|||||||
|
|
||||||
static void RebuildSwapChain(int width, int height)
|
static void RebuildSwapChain(int width, int height)
|
||||||
{
|
{
|
||||||
ImGui_ImplVulkanH_CreateWindowDataSwapChainAndFramebuffer(g_PhysicalDevice, g_Device, &g_WindowData, g_Allocator, width, height, g_MinImageCount);
|
ImGui_ImplVulkanH_CreateWindowDataSwapChainAndFramebuffer(g_PhysicalDevice, g_Device, &g_WindowData, g_Allocator, width, height, g_MinImageCount);
|
||||||
ImGui_ImplVulkanH_CreateWindowDataCommandBuffers(g_PhysicalDevice, g_Device, g_QueueFamily, &g_WindowData, g_Allocator);
|
ImGui_ImplVulkanH_CreateWindowDataCommandBuffers(g_PhysicalDevice, g_Device, g_QueueFamily, &g_WindowData, g_Allocator);
|
||||||
ImGui_ImplVulkan_SetQueuedFramesCount(g_WindowData.BackBufferCount);
|
ImGui_ImplVulkan_SetQueuedFramesCount(g_WindowData.BackBufferCount);
|
||||||
g_WindowData.FrameIndex = 0;
|
g_WindowData.FrameIndex = 0;
|
||||||
g_PendingSwapchainRebuild = false;
|
g_PendingSwapchainRebuild = false;
|
||||||
}
|
|
||||||
|
|
||||||
static void RebuildSwapChain()
|
|
||||||
{
|
|
||||||
RebuildSwapChain(g_WindowData.Width, g_WindowData.Height);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int, char**)
|
int main(int, char**)
|
||||||
@ -370,7 +365,7 @@ int main(int, char**)
|
|||||||
init_info.PipelineCache = g_PipelineCache;
|
init_info.PipelineCache = g_PipelineCache;
|
||||||
init_info.DescriptorPool = g_DescriptorPool;
|
init_info.DescriptorPool = g_DescriptorPool;
|
||||||
init_info.Allocator = g_Allocator;
|
init_info.Allocator = g_Allocator;
|
||||||
init_info.QueuedFrames = wd->BackBufferCount;
|
init_info.QueuedFrames = wd->BackBufferCount;
|
||||||
init_info.CheckVkResultFn = check_vk_result;
|
init_info.CheckVkResultFn = check_vk_result;
|
||||||
ImGui_ImplVulkan_Init(&init_info, wd->RenderPass);
|
ImGui_ImplVulkan_Init(&init_info, wd->RenderPass);
|
||||||
|
|
||||||
@ -439,11 +434,11 @@ int main(int, char**)
|
|||||||
if (event.type == SDL_QUIT)
|
if (event.type == SDL_QUIT)
|
||||||
done = true;
|
done = true;
|
||||||
if (event.type == SDL_WINDOWEVENT && event.window.event == SDL_WINDOWEVENT_RESIZED && event.window.windowID == SDL_GetWindowID(window))
|
if (event.type == SDL_WINDOWEVENT && event.window.event == SDL_WINDOWEVENT_RESIZED && event.window.windowID == SDL_GetWindowID(window))
|
||||||
RebuildSwapChain((int)event.window.data1, (int)event.window.data2);
|
RebuildSwapChain((int)event.window.data1, (int)event.window.data2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_PendingSwapchainRebuild)
|
if (g_PendingSwapchainRebuild)
|
||||||
RebuildSwapChain();
|
RebuildSwapChain(g_WindowData.Width, g_WindowData.Height);
|
||||||
|
|
||||||
// Start the Dear ImGui frame
|
// Start the Dear ImGui frame
|
||||||
ImGui_ImplVulkan_NewFrame();
|
ImGui_ImplVulkan_NewFrame();
|
||||||
@ -485,26 +480,26 @@ int main(int, char**)
|
|||||||
if (ImGui::Button("Close Me"))
|
if (ImGui::Button("Close Me"))
|
||||||
show_another_window = false;
|
show_another_window = false;
|
||||||
|
|
||||||
if (ImGui::Button("Increase"))
|
if (ImGui::Button("Increase"))
|
||||||
{
|
{
|
||||||
g_MinImageCount++;
|
g_MinImageCount++;
|
||||||
g_PendingSwapchainRebuild = true;
|
g_PendingSwapchainRebuild = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if (ImGui::Button("Decrease"))
|
if (ImGui::Button("Decrease"))
|
||||||
{
|
{
|
||||||
if (g_MinImageCount != 2)
|
if (g_MinImageCount != 2)
|
||||||
{
|
{
|
||||||
g_MinImageCount--;
|
g_MinImageCount--;
|
||||||
g_PendingSwapchainRebuild = true;
|
g_PendingSwapchainRebuild = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Text("Back Buffers: %i", g_MinImageCount);
|
ImGui::Text("Back Buffers: %i", g_MinImageCount);
|
||||||
|
|
||||||
ImGui::Text("Frame Index %i", wd->FrameIndex);
|
ImGui::Text("Frame Index %i", wd->FrameIndex);
|
||||||
|
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
}
|
}
|
||||||
|
@ -739,14 +739,14 @@ void ImGui_ImplVulkan_InvalidateDeviceObjects()
|
|||||||
|
|
||||||
void ImGui_ImplVulkan_InvalidateFrameDeviceObjects()
|
void ImGui_ImplVulkan_InvalidateFrameDeviceObjects()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < g_FramesDataBuffers.size(); i++)
|
for (int i = 0; i < g_FramesDataBuffers.size(); i++)
|
||||||
{
|
{
|
||||||
FrameDataForRender* fd = &g_FramesDataBuffers[i];
|
FrameDataForRender* fd = &g_FramesDataBuffers[i];
|
||||||
if (fd->VertexBuffer) { vkDestroyBuffer(g_Device, fd->VertexBuffer, g_Allocator); fd->VertexBuffer = VK_NULL_HANDLE; }
|
if (fd->VertexBuffer) { vkDestroyBuffer(g_Device, fd->VertexBuffer, g_Allocator); fd->VertexBuffer = VK_NULL_HANDLE; }
|
||||||
if (fd->VertexBufferMemory) { vkFreeMemory (g_Device, fd->VertexBufferMemory, g_Allocator); fd->VertexBufferMemory = VK_NULL_HANDLE; }
|
if (fd->VertexBufferMemory) { vkFreeMemory (g_Device, fd->VertexBufferMemory, g_Allocator); fd->VertexBufferMemory = VK_NULL_HANDLE; }
|
||||||
if (fd->IndexBuffer) { vkDestroyBuffer(g_Device, fd->IndexBuffer, g_Allocator); fd->IndexBuffer = VK_NULL_HANDLE; }
|
if (fd->IndexBuffer) { vkDestroyBuffer(g_Device, fd->IndexBuffer, g_Allocator); fd->IndexBuffer = VK_NULL_HANDLE; }
|
||||||
if (fd->IndexBufferMemory) { vkFreeMemory (g_Device, fd->IndexBufferMemory, g_Allocator); fd->IndexBufferMemory = VK_NULL_HANDLE; }
|
if (fd->IndexBufferMemory) { vkFreeMemory (g_Device, fd->IndexBufferMemory, g_Allocator); fd->IndexBufferMemory = VK_NULL_HANDLE; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ImGui_ImplVulkan_Init(ImGui_ImplVulkan_InitInfo* info, VkRenderPass render_pass)
|
bool ImGui_ImplVulkan_Init(ImGui_ImplVulkan_InitInfo* info, VkRenderPass render_pass)
|
||||||
@ -771,11 +771,9 @@ bool ImGui_ImplVulkan_Init(ImGui_ImplVulkan_InitInfo* info, VkRenderPass rend
|
|||||||
g_DescriptorPool = info->DescriptorPool;
|
g_DescriptorPool = info->DescriptorPool;
|
||||||
g_Allocator = info->Allocator;
|
g_Allocator = info->Allocator;
|
||||||
g_CheckVkResultFn = info->CheckVkResultFn;
|
g_CheckVkResultFn = info->CheckVkResultFn;
|
||||||
g_FramesDataBuffers.resize(info->QueuedFrames);
|
g_FramesDataBuffers.resize(info->QueuedFrames);
|
||||||
for (int i = 0; i < g_FramesDataBuffers.size(); i++)
|
for (int i = 0; i < g_FramesDataBuffers.size(); i++)
|
||||||
{
|
g_FramesDataBuffers[i] = FrameDataForRender();
|
||||||
g_FramesDataBuffers[i] = FrameDataForRender();
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui_ImplVulkan_CreateDeviceObjects();
|
ImGui_ImplVulkan_CreateDeviceObjects();
|
||||||
|
|
||||||
@ -784,7 +782,7 @@ bool ImGui_ImplVulkan_Init(ImGui_ImplVulkan_InitInfo* info, VkRenderPass rend
|
|||||||
|
|
||||||
void ImGui_ImplVulkan_Shutdown()
|
void ImGui_ImplVulkan_Shutdown()
|
||||||
{
|
{
|
||||||
ImGui_ImplVulkan_InvalidateFrameDeviceObjects();
|
ImGui_ImplVulkan_InvalidateFrameDeviceObjects();
|
||||||
ImGui_ImplVulkan_InvalidateDeviceObjects();
|
ImGui_ImplVulkan_InvalidateDeviceObjects();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -794,20 +792,15 @@ void ImGui_ImplVulkan_NewFrame()
|
|||||||
|
|
||||||
void ImGui_ImplVulkan_SetQueuedFramesCount(uint32_t count)
|
void ImGui_ImplVulkan_SetQueuedFramesCount(uint32_t count)
|
||||||
{
|
{
|
||||||
if (count == g_FramesDataBuffers.size())
|
if (count == g_FramesDataBuffers.size())
|
||||||
{
|
return;
|
||||||
return;
|
ImGui_ImplVulkan_InvalidateFrameDeviceObjects();
|
||||||
}
|
|
||||||
ImGui_ImplVulkan_InvalidateFrameDeviceObjects();
|
|
||||||
|
|
||||||
uint32_t old_size = g_FramesDataBuffers.size();
|
uint32_t old_size = g_FramesDataBuffers.size();
|
||||||
g_FramesDataBuffers.resize(count);
|
g_FramesDataBuffers.resize(count);
|
||||||
for (uint32_t i = old_size; i < count; i++)
|
for (uint32_t i = old_size; i < count; i++)
|
||||||
{
|
g_FramesDataBuffers[i] = FrameDataForRender();
|
||||||
|
g_FrameIndex = 0;
|
||||||
g_FramesDataBuffers[i] = FrameDataForRender();
|
|
||||||
}
|
|
||||||
g_FrameIndex = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1040,18 +1033,14 @@ void ImGui_ImplVulkanH_CreateWindowDataSwapChainAndFramebuffer(VkPhysicalDevice
|
|||||||
err = vkGetSwapchainImagesKHR(device, wd->Swapchain, &wd->BackBufferCount, NULL);
|
err = vkGetSwapchainImagesKHR(device, wd->Swapchain, &wd->BackBufferCount, NULL);
|
||||||
check_vk_result(err);
|
check_vk_result(err);
|
||||||
err = vkGetSwapchainImagesKHR(device, wd->Swapchain, &wd->BackBufferCount, wd->BackBuffer);
|
err = vkGetSwapchainImagesKHR(device, wd->Swapchain, &wd->BackBufferCount, wd->BackBuffer);
|
||||||
check_vk_result(err);
|
check_vk_result(err);
|
||||||
|
|
||||||
for (uint32_t i = 0; i < wd->Frames.size(); i++)
|
for (uint32_t i = 0; i < wd->Frames.size(); i++)
|
||||||
{
|
ImGui_ImplVulkanH_DestroyFrameData(g_Instance, device, &wd->Frames[i], allocator);
|
||||||
ImGui_ImplVulkanH_DestroyFrameData(g_Instance, device, &wd->Frames[i], allocator);
|
uint32_t old_size = wd->Frames.size();
|
||||||
}
|
wd->Frames.resize(wd->BackBufferCount);
|
||||||
uint32_t old_size = wd->Frames.size();
|
for (uint32_t i = 0; i < wd->Frames.size(); i++)
|
||||||
wd->Frames.resize(wd->BackBufferCount);
|
wd->Frames[i] = ImGui_ImplVulkanH_FrameData();
|
||||||
for (uint32_t i = 0; i < wd->Frames.size(); i++)
|
|
||||||
{
|
|
||||||
wd->Frames[i] = ImGui_ImplVulkanH_FrameData();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (old_swapchain)
|
if (old_swapchain)
|
||||||
vkDestroySwapchainKHR(device, old_swapchain, allocator);
|
vkDestroySwapchainKHR(device, old_swapchain, allocator);
|
||||||
@ -1141,7 +1130,7 @@ void ImGui_ImplVulkanH_DestroyWindowData(VkInstance instance, VkDevice device, I
|
|||||||
for (int i = 0; i < wd->Frames.size(); i++)
|
for (int i = 0; i < wd->Frames.size(); i++)
|
||||||
{
|
{
|
||||||
ImGui_ImplVulkanH_FrameData* fd = &wd->Frames[i];
|
ImGui_ImplVulkanH_FrameData* fd = &wd->Frames[i];
|
||||||
ImGui_ImplVulkanH_DestroyFrameData(instance, device, fd, allocator);
|
ImGui_ImplVulkanH_DestroyFrameData(instance, device, fd, allocator);
|
||||||
}
|
}
|
||||||
for (uint32_t i = 0; i < wd->BackBufferCount; i++)
|
for (uint32_t i = 0; i < wd->BackBufferCount; i++)
|
||||||
{
|
{
|
||||||
@ -1156,9 +1145,9 @@ void ImGui_ImplVulkanH_DestroyWindowData(VkInstance instance, VkDevice device, I
|
|||||||
|
|
||||||
void ImGui_ImplVulkanH_DestroyFrameData(VkInstance instance, VkDevice device, ImGui_ImplVulkanH_FrameData* fd, const VkAllocationCallbacks* allocator)
|
void ImGui_ImplVulkanH_DestroyFrameData(VkInstance instance, VkDevice device, ImGui_ImplVulkanH_FrameData* fd, const VkAllocationCallbacks* allocator)
|
||||||
{
|
{
|
||||||
vkDestroyFence(device, fd->Fence, allocator);
|
vkDestroyFence(device, fd->Fence, allocator);
|
||||||
vkFreeCommandBuffers(device, fd->CommandPool, 1, &fd->CommandBuffer);
|
vkFreeCommandBuffers(device, fd->CommandPool, 1, &fd->CommandBuffer);
|
||||||
vkDestroyCommandPool(device, fd->CommandPool, allocator);
|
vkDestroyCommandPool(device, fd->CommandPool, allocator);
|
||||||
vkDestroySemaphore(device, fd->ImageAcquiredSemaphore, allocator);
|
vkDestroySemaphore(device, fd->ImageAcquiredSemaphore, allocator);
|
||||||
vkDestroySemaphore(device, fd->RenderCompleteSemaphore, allocator);
|
vkDestroySemaphore(device, fd->RenderCompleteSemaphore, allocator);
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ struct ImGui_ImplVulkan_InitInfo
|
|||||||
VkQueue Queue;
|
VkQueue Queue;
|
||||||
VkPipelineCache PipelineCache;
|
VkPipelineCache PipelineCache;
|
||||||
VkDescriptorPool DescriptorPool;
|
VkDescriptorPool DescriptorPool;
|
||||||
int QueuedFrames;
|
int QueuedFrames;
|
||||||
const VkAllocationCallbacks* Allocator;
|
const VkAllocationCallbacks* Allocator;
|
||||||
void (*CheckVkResultFn)(VkResult err);
|
void (*CheckVkResultFn)(VkResult err);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user