mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Examples: Vulkan: Fix for empty draw data (init time) + fixed warning.
This commit is contained in:
parent
10752423ec
commit
243fd67b1c
2 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue