Modified resize logic
This commit is contained in:
parent
622c0478ac
commit
79a73b8ceb
@ -427,6 +427,11 @@ void Engine::run() {
|
||||
while (!glfwWindowShouldClose(window)) {
|
||||
glfwPollEvents();
|
||||
|
||||
int w, h;
|
||||
glfwGetFramebufferSize(window, &w, &h);
|
||||
|
||||
if (w != _windowExtent.width || h != _windowExtent.height ) { _requestResize = true; };
|
||||
|
||||
if (_requestResize) {resizeSwapchain();};
|
||||
|
||||
if (glfwGetWindowAttrib(window, GLFW_ICONIFIED)) {
|
||||
@ -1318,7 +1323,7 @@ void Engine::resizeSwapchain() {
|
||||
destroySwapchain();
|
||||
|
||||
int w, h;
|
||||
glfwGetWindowSize(window, &w, &h);
|
||||
glfwGetFramebufferSize(window, &w, &h);
|
||||
|
||||
_windowExtent.width = w;
|
||||
_windowExtent.height = h;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user