Trying to add Imgui to my project. This is the render loop:
while (!glfwWindowShouldClose(window))
{
double currentTime = glfwGetTime();
double deltaTime = currentTime - lastTime;
lastTime = currentTime;
glfwPollEvents();
int width, height;
glfwGetWindowSize(window, &width, &height);
game.update();
if (width > 0 && height > 0)
{
processInput(window, game.camera, deltaTime);
draw(queue_family_indices,game.camera,queue_family_indices,width,height);
if (currentTime-delay>=1)
{
spdlog::info("FPS: {}", 1.0 / deltaTime);
delay = currentTime;
glm::ivec3 camPos =Game::calculateChunkPosition(game.camera.position);
spdlog::info("Camera position: {},{}, {}", camPos.x, camPos.y, camPos.z);
}
}
if (glfwGetWindowAttrib(window,GLFW_ICONIFIED)!=0)
{
ImGui_ImplGlfw_Sleep(10);
}
vkDeviceWaitIdle(device);
}
This is draw - https://pastebin.com/B8mtP1Ht
This is recordCommandBuffer - https://pastebin.com/V7ekrx2w
It crashes on ImGui_ImplVulkan_RenderDrawData with code -1000069000
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.