1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-11-12 02:00:58 +01:00

Examples: Vulkan: Fix for empty draw data (init time) + fixed warning.

This commit is contained in:
omar 2018-02-16 22:28:52 +01:00
parent 10752423ec
commit 243fd67b1c
2 changed files with 3 additions and 1 deletions

View File

@ -170,6 +170,8 @@ void ImGui_ImplGlfwVulkan_RenderDrawData(ImDrawData* draw_data)
{
VkResult err;
ImGuiIO& io = ImGui::GetIO();
if (draw_data->TotalVtxCount == 0)
return;
// Create the Vertex Buffer:
size_t vertex_size = draw_data->TotalVtxCount * sizeof(ImDrawVert);

View File

@ -507,7 +507,7 @@ static void cleanup_vulkan()
static void frame_begin()
{
VkResult err;
while (true)
for (;;)
{
err = vkWaitForFences(g_Device, 1, &g_Fence[g_FrameIndex], VK_TRUE, 100);
if (err == VK_SUCCESS) break;