为什么在Windows上用GLFW创建窗口失败?

Why do I fail to create a window with GLFW on Windows?

本文关键字:窗口 失败 创建 GLFW Windows 上用 为什么      更新时间:2023-10-16

如果有人能告诉我这是什么问题,我将很高兴。

int main() {
    glfwWindowHint(GLFW_SAMPLES, 4);
    glfwWindowHint(GLFW_VERSION_MAJOR, 3);
    glfwWindowHint(GLFW_VERSION_MINOR, 3);
    glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
    GLFWwindow* window;
    window = glfwCreateWindow(1024, 768, "window", NULL, NULL);
}

看起来Windows上的OpenGL驱动程序存在问题。

尝试检查和更新您的OpenGL驱动程序:

  • 安装OpenGL查看器,例如GLview实用程序,以查看机器上安装的OpenGL版本。
  • 对于Windows XP, Windows Vista和Windows 7,打开查看器以查找计算机上运行的OpenGL版本和驱动程序版本。
  • 点击"检查更新的驱动程序"链接以确定是否需要任何驱动程序更新。

节选自本网站