Finally handle swap chain recreation! resizing the window is possible now. Need to comment about what is happening in draw frames. Rewrote the main function to use a Singleton framework as well
This commit is contained in:
parent
db832a7dae
commit
5fca2134fe
@ -12,6 +12,12 @@ namespace RenderPresent {
|
||||
uint32_t currentFrame = 0;
|
||||
|
||||
void recreateSwapChain() {
|
||||
int width = 0, height = 0;
|
||||
glfwGetFramebufferSize(Global::window, &width, &height);
|
||||
while (width == 0 || height == 0) {
|
||||
glfwGetFramebufferSize(Global::window, &width, &height);
|
||||
glfwWaitEvents();
|
||||
}
|
||||
vkDeviceWaitIdle(Global::device);
|
||||
// Don't really wanna do this but I also don't want to create an extra class instance just to call the cleanup function.
|
||||
for(auto framebuffer : pipeline.getSwapChainFramebuffers()) {
|
||||
|
Loading…
Reference in New Issue
Block a user