src/main.cpp
// glfw: whenever the window size changed (by OS or user resize) this callback function executes
// ---------------------------------------------------------------------------------------------
whenever the window size changed (by OS or user resize) this callback function executes
whenever the window size changed ( by OS or user resize ) this callback function executes
void framebuffer_size_callback(GLFWwindow* window, int width, int height) {
    auto& state = *static_cast<engine::State*>(glfwGetWindowUserPointer(window));
    auto projection = state.getWindow();
    if (height == 0) height = 1;
    projection->width = width;
    projection->height = height;
    glViewport(0, 0, width, height);
}
void framebuffer_size_callback ( GLFWwindow * window , int width , int height ) { auto & state = * static_cast < engine :: State * > ( glfwGetWindowUserPointer ( window ) ) ; auto projection = state . getWindow ( ) ; if ( height == 0 ) height = 1 ; projection -> width = width ; projection -> height = height ; glViewport ( 0 , 0 , width , height ) ; }
glfw: whenever the window size changed (by OS or user resize) this callback function executes
glfw : whenever the window size changed ( by OS or user resize ) this callback function executes
// make sure the viewport matches the new window dimensions; note that width and // height will be significantly larger than specified on retina displays. // Check when minimizing window