mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-22 11:57:00 +00:00
Examples: Vulkan: Fix for empty draw data (init time) + fixed warning.
This commit is contained in:
parent
10752423ec
commit
243fd67b1c
@ -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…
Reference in New Issue
Block a user