constunsignedintSCR_WIDTH=800;constunsignedintSCR_HEIGHT=600;GLFWwindow*window=glfwCreateWindow(SCR_WIDTH,SCR_HEIGHT,"LearnOpenGL",NULL,NULL);if(window==NULL){std::cout<<"Failed to create GLFW window"<<std::endl;glfwTerminate();return-1;}glfwMakeContextCurrent(window);glfwSetFramebufferSizeCallback(window,framebuffer_size_callback);
1234
if(!gladLoadGLLoader((GLADloadproc)glfwGetProcAddress)){std::cout<<"Failed to initialize GLAD"<<std::endl;return-1;}
voidframebuffer_size_callback([[maybe_unused]]GLFWwindow*window,intwidth,intheight){// make sure the viewport matches the new window dimensions; note that width// and height will be significantly larger than specified on retina// displays.glViewport(0,0,width,height);}