LWJGL,找到合适的像素格式

时间:2017-01-25 23:01:12

标签: java opengl lwjgl glfw

当我尝试运行this tutorial的代码时,它会给我一个“找不到合适的像素格式”

    glfwDefaultWindowHints();
    glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
    glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
    glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
    glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);

    windowHandle = glfwCreateWindow(width, height, title, NULL, NULL);
    if(windowHandle==NULL){
        throw new RuntimeException("Failed to create the GLFW window");
    }

这些问题来自于这些问题。 (根据stacktrace)当逐步调试代码时,一切正常,直到调用glfwCreateWindow。宽度为800,高度为600,因此对于27英寸显示器来说,这绝对没问题。我甚至使用OpenGL Extensions Viewer来验证是否支持此特定分辨率。

我的系统:我在2011年安装了Lates Sierra的MacBook pro,IDE是netbeans,根据OpenGL Extensions Viewer,安装的OpenGL版本是3.3。

0 个答案:

没有答案
相关问题