mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-24 07:40:22 +01: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;
|
VkResult err;
|
||||||
ImGuiIO& io = ImGui::GetIO();
|
ImGuiIO& io = ImGui::GetIO();
|
||||||
|
if (draw_data->TotalVtxCount == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
// Create the Vertex Buffer:
|
// Create the Vertex Buffer:
|
||||||
size_t vertex_size = draw_data->TotalVtxCount * sizeof(ImDrawVert);
|
size_t vertex_size = draw_data->TotalVtxCount * sizeof(ImDrawVert);
|
||||||
|
@ -507,7 +507,7 @@ static void cleanup_vulkan()
|
|||||||
static void frame_begin()
|
static void frame_begin()
|
||||||
{
|
{
|
||||||
VkResult err;
|
VkResult err;
|
||||||
while (true)
|
for (;;)
|
||||||
{
|
{
|
||||||
err = vkWaitForFences(g_Device, 1, &g_Fence[g_FrameIndex], VK_TRUE, 100);
|
err = vkWaitForFences(g_Device, 1, &g_Fence[g_FrameIndex], VK_TRUE, 100);
|
||||||
if (err == VK_SUCCESS) break;
|
if (err == VK_SUCCESS) break;
|
||||||
|
Loading…
Reference in New Issue
Block a user