blurrypiano / littleVulkanEngine

Code repo for video tutorial series teaching Vulkan and computer graphics
MIT License
829 stars 147 forks source link

Problem resizing the window -> Episode 13 #46

Closed WananicheObs closed 7 months ago

WananicheObs commented 7 months ago

I'm watching your tutorial on the Vulkan Game Engine Tutorial, but after completing the 13th tutorial, I realise a problem. even re-watching the this episode multiple time, when I resize the window, the cube always stay at the same position from the corner of the screen [image for reference] image image I believe the problem comes from the fact that I'm using Windows11 compare to you on Apple, but I do not know how I can solve this issues. inspecting the variable when running the code, I can see that the windowExtent and swapChainExtant never changes, no matter if I scale it up or down. the code of those two has already been inspected, so the problem also isn't comming from there, do you have any idea or suggestion on what is the problem and how to solve it?

if you want any more information, I'll be happy to oblige

[Edit1] if I put a Breakpoint at the FramebufferResizeCallback, I can see that the size of vulWindow does change, but this information doesn't really help me -> if the new size is given, then why does it return back latter on? image [Edit2] I realise that the VK_ERROR_OUT_OF_DATE_KHR error was never called, so the swapChain cannot recreate itself (I don't know what information you need to help me so I'm giving everything I can think of)

WananicheObs commented 7 months ago

I forgot a recreateSwapChain() there : image sorry for the time