You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After following and implementing the chapter on ImGui, (which I think I've done correctly since everything seems to work fine) I noticed a large input lag when I drag the ImGui window.
engine.2024.07.30.-.12.33.05.04.mp4
It's a bit hard to tell due to a bug in gforce experience's recorder not moving the cursor image, but if you look at the cursor compared to the window movement you should be able to notice the delay. As you can see in the video my FPS is stable at 60, so it's not that.
My guess is that it's due to vsync wait order:
VulkanEngine::run(){
// Update input using SDL_PollEvent/ ImGui_ImplSDL2_ProcessEvent
// Render ImGui
// call draw
}
VulkanEngine::draw(){
// Wait for fence -> Already done on my GPU
// vkAcquireNextImageKHR -> Wait for vsync
// Wait done, so now we use the input that was collected before the wait to renderer. Aka. 'last frame's' data
}
If I understand it correctly, the vsync wait should actually happen after present / before SDL_PollEvent. That way we fetch the input etc. right before we render the frame
The text was updated successfully, but these errors were encountered:
After following and implementing the chapter on ImGui, (which I think I've done correctly since everything seems to work fine) I noticed a large input lag when I drag the ImGui window.
engine.2024.07.30.-.12.33.05.04.mp4
It's a bit hard to tell due to a bug in gforce experience's recorder not moving the cursor image, but if you look at the cursor compared to the window movement you should be able to notice the delay. As you can see in the video my FPS is stable at 60, so it's not that.
My guess is that it's due to vsync wait order:
If I understand it correctly, the vsync wait should actually happen after present / before
SDL_PollEvent
. That way we fetch the input etc. right before we render the frameThe text was updated successfully, but these errors were encountered: