相关基础库: GLFW https://www.glfw.org/download.html GLAD https://glad.dav1d.de/ 准备一个可以运行opengl的c++环境 #include <iostream> #include <glad/glad.h> #include <GLFW/glfw3.h> void framebuffer_size_callback(GLFWwindow* window, int width, int height) { glViewport(0, 0, width, height); } void processInput