【问题标题】:LWJGL reports that OpenGL is not supported on a modern nvidia cardLWJGL 报告现代 nvidia 卡不支持 OpenGL
【发布时间】:2015-03-04 23:40:39
【问题描述】:

所以过去一天我一直在尝试 libgdx,它运行良好,直到我意识到它只适用于我的带有英特尔显卡的笔记本电脑,而它在我的带有 nvidia 750ti 的台式机上立即关闭。

根据this github issue 的说法,这个问题应该已经在this commit 中修复了。

我还尝试了旧帖子中其他人推荐的方法,例如 herehere(自那次提交以来不再需要,但值得尝试)

System.setProperty("org.lwjgl.opengl.Display.allowSoftwareOpenGL", "true");

不管你信不信,它是行不通的。这是堆栈跟踪

Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: OpenGL is not supported by the video driver.
    at com.badlogic.gdx.backends.lwjgl.LwjglGraphics.createDisplayPixelFormat(LwjglGraphics.java:229)
    at com.badlogic.gdx.backends.lwjgl.LwjglGraphics.setupDisplay(LwjglGraphics.java:174)
    at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:138)
    at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:120)
Caused by: org.lwjgl.LWJGLException: X Error - disp: 0x7f0f4c000c50 serial: 194 error: BadValue (integer parameter out of range for operation) request_code: 154 minor_code: 24
    at org.lwjgl.opengl.LinuxDisplay.globalErrorHandler(LinuxDisplay.java:320)
    at org.lwjgl.opengl.LinuxContextImplementation.nCreate(Native Method)
    at org.lwjgl.opengl.LinuxContextImplementation.create(LinuxContextImplementation.java:51)
    at org.lwjgl.opengl.ContextGL.<init>(ContextGL.java:132)
    at org.lwjgl.opengl.Display.create(Display.java:850)
    at org.lwjgl.opengl.Display.create(Display.java:757)
    at com.badlogic.gdx.backends.lwjgl.LwjglGraphics.createDisplayPixelFormat(LwjglGraphics.java:220)
    ... 3 more

将堆栈跟踪与this guy 进行比较时,原因显然不是Pixel format is not accelerated 而是Caused by: org.lwjgl.LWJGLException: X Error - disp: 0x7f12cc000c50 serial: 194 error: BadValue (integer parameter out of range for operation) request_code: 154 minor_code: 24。 也许这只是因为我正在运行 linux 而他不是,我不知道。虽然integer parameter out of range for operation 错误会是 LWJGL 认为我的视频驱动程序不支持 OpenGL 的原因,但这看起来确实很奇怪,但这只是一个猜测。

Here is the exact code that i'm trying to run。我不认为代码应该受到责备,因为它在我的笔记本电脑上运行良好,但我在这里添加了它以防万一。

我的笔记本电脑和台式机都运行最新的 Arch Linux 安装,所以操作系统应该不是问题。

提前致谢!

【问题讨论】:

  • github 问题是因为硬件设备太旧而无法支持 LWJGL。我认为你的情况不同。有任何 OpenGL 应用程序适合您吗? (你能让glxgears 工作吗?)
  • 谢谢,OpenGL 出了点问题,简单的重启解决了我的问题。当我启动它们时,glxinfo 和 glxgears 就崩溃了。

标签: libgdx lwjgl


【解决方案1】:

解决方案非常简单,感谢P.T. 的帮助。

我不知道出了什么问题,但实际上根本无法运行任何 OpenGL 应用程序,简单的重启解决了我的问题。

【讨论】:

    【解决方案2】:

    打开软件和更新

    其他驱动程序

    使用 X.Org X 服务器 - 来自 xserver-xorg-video-mouveau(开源)的 Nouveau 显示驱动程序

    应用更改

    打开终端

    sudo 立即重启

    【讨论】:

    • 您的答案可以通过额外的支持信息得到改进。请edit 添加更多详细信息,例如引用或文档,以便其他人可以确认您的答案是正确的。你可以找到更多关于如何写好答案的信息in the help center
    猜你喜欢
    • 2013-09-20
    • 2018-08-19
    • 1970-01-01
    • 1970-01-01
    • 2011-09-06
    • 1970-01-01
    • 2013-08-06
    • 2013-10-25
    • 1970-01-01
    相关资源
    最近更新 更多