为什么在Windows上无法使用GLFW创建窗口? [英] Why do I fail to create a window with GLFW on Windows?

查看:3421
本文介绍了为什么在Windows上无法使用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);

}


解决方案



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




  • 安装OpenGL查看器,例如 GLview 实用程序

  • 对于Windows XP,Windows Vista和Windows 7,打开查看器以查找在计算机上运行的OpenGL下的版本和驱动程序版本。

  • 点击检查更新的驱动程序链接,以确定是否需要更新驱动程序。



摘自此网站。 / p>

I'll be glad if someone could please tell me what is the issue here:

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

}

解决方案

Looks like there is an issues with your OpenGL drivers on Windows.

Try to check and update your OpenGL drivers :

  • Install an OpenGL viewer, such as the GLview utility, to view the OpenGL version installed on your machine.
  • For Windows XP, Windows Vista, and Windows 7, open the viewer to find the version and driver version under OpenGL running on your computer.
  • Click the "Check for updated drivers" link to identify if any driver updates are necessary.

Excerpts taken from this website.

这篇关于为什么在Windows上无法使用GLFW创建窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆