简体   繁体   English

无法使用LWJGL在NetBeans中打开窗口

[英]Can't open a window in netbeans with LWJGL

I'm trying to write a small platformer game in Java. 我正在尝试用Java编写一个小型平台游戏。 Nothing big, more of a practice exercise for other things. 没什么大不了的,更多的是做其他事情的练习。 However, I keep running into an issue trying to use OpenGL for graphics. 但是,我一直遇到尝试使用OpenGL进行图形处理的问题。 My IDE is Netbeans v.8.2, and I'm using LWJGL to access OpenGL. 我的IDE是Netbeans v.8.2,我正在使用LWJGL访问OpenGL。 When I try to run the basic 'test' code LWJGL provides( https://www.lwjgl.org/guide ) it won't run. 当我尝试运行LWJGL提供的基本“测试”代码( https://www.lwjgl.org/guide )时,它将无法运行。 The error I'm getting is: 我得到的错误是:

[LWJGL] GLFW_API_UNAVAILABLE error Description : WGL: The driver does not appear to support OpenGL [LWJGL] GLFW_API_UNAVAILABLE错误说明:WGL:驱动程序似乎不支持OpenGL

This is really weird though, as I know my GC and driver do support OpenGL. 不过,这确实很奇怪,因为我知道我的GC和驱动程序确实支持OpenGL。 I can run Minecraft which uses it(not the best test I know), and I've confirmed using GPU Caps Viewer that my driver( Intel(R) HD Graphics) supports OpenGL 3.1. 我可以运行使用它的Minecraft(不是我所知道的最佳测试),并且我已经使用GPU Caps Viewer确认了我的驱动程序(Intel(R)HD Graphics)支持OpenGL 3.1。 It's driving me crazy, and I've spent days looking for anything like this online, but all I can find are extrememly outdated posts and sources that don't seem to apply to my situation. 这让我发疯了,我花了几天时间在网上寻找类似的东西,但是我所能找到的都是极端过时的帖子和资源,似乎不适用于我的情况。 OpenGL seems to be the perfect tool for the graphics of this project, and I'd really rather not switch over to something else, or re-write the program in something like C++ just to use it. OpenGL似乎是该项目图形的完美工具,我真的不希望切换到其他应用程序,或者只使用C ++来重写该程序。 So I'm turning to the brilliance of StackOverFlow. 因此,我转向了StackOverFlow的辉煌之处。 Any ideas? 有任何想法吗?

With the information available in the question, this is most likely the second of the two cases here: https://github.com/LWJGL/lwjgl/issues/119#issuecomment-138078724 有了问题中可用的信息,很可能是这两种情况中的第二种: https : //github.com/LWJGL/lwjgl/issues/119#issuecomment-138078724

To reiterate, Intel dropped support for their HD Graphics 2000/3000 GPUs, and it looks like something in Java 8u60 broke support. 重申一下,英特尔放弃了对其HD Graphics 2000/3000 GPU的支持,而且Java 8u60中的某些功能似乎中断了支持。 I would first try making sure everything is up to date (GPU drivers, Java, LWJGL), and if that doesn't work, try downgrading below 8u60. 我将首先尝试确保所有内容都是最新的(GPU驱动程序,Java,LWJGL),如果这不起作用,请尝试将其降级到8u60以下。

It looks like there's also a driver-side patch from Marcinosoft at the bottom of that issue that you can try installing as well before downgrading. 看来该问题的底部还有Marcinosoft提供的驱动程序侧补丁,您也可以在降级之前尝试安装。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM