为什么我在 Windows 上无法使用 GLFW 创建窗口?

Liz*_*izi 2 c++ windows opengl glfw

如果有人能告诉我这里的问题是什么,我会很高兴:

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);

}
Run Code Online (Sandbox Code Playgroud)

sla*_*vak 5

Windows 上的 OpenGL 驱动程序似乎存在问题。

\n\n

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

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

摘自本网站

\n