ImGui::Render();
int displayW, displayH;
glfwMakeContextCurrent(window);
glfwGetFramebufferSize(window, &displayW, &displayH);
glViewport(0, 0, displayW, displayH);
glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w);
glClear(GL_COLOR_BUFFER_BIT);
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
I’m still pretty inexperienced with graphics programming and only know a little bit about OpenGL but I usually would only call glViewport in the framebuffer size callback. Is there a reason why we get the framebuffer size and set the viewport every tick vs just doing it inside framebuffer callback?