每当我调整GLFW窗口大小时,在调整窗口大小时都不会绘制。我调整窗口大小后,才可以绘制窗口新暴露的部分。您可以在下面的图片中自己看到它:

这是我的应用程序的代码。我在Visual Studio 2015上运行Windows 10
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <iostream>
void framebuffer_size_callback(GLFWwindow* window, int width, int height);
void processInput(GLFWwindow *window);
void get_resolution(int* window_width, int* window_height);
void initGlfwSettings();
GLFWwindow* initGlfwWindow();
void initGlad();
// settings
const unsigned int SCR_WIDTH = 800;
const unsigned int SCR_HEIGHT = 600;
int main()
{
initGlfwSettings();
GLFWwindow* window = initGlfwWindow();
initGlad();
// glad: load all OpenGL function pointers
// ---------------------------------------
// render loop
// -----------
while (!glfwWindowShouldClose(window))
{
int width, height;
glfwGetWindowSize(window, &width, &height);
glClearColor(0.2f, 0.3f, …Run Code Online (Sandbox Code Playgroud)