lizongbo at 618119.com 工作,生活,Android,前端,Linode,Ubuntu,nginx,java,apache,tomcat,Resin,mina,Hessian,XMPP,RPC

2013年02月22日

Exception in thread “LWJGL Application” com.badlogic.gdx.utils.GdxRuntimeException: com.badlogic.gdx.utils.GdxRuntimeException: OpenGL is not supported by the video driver.的解决办法

Filed under: Android,Java — 标签:, , , — lizongbo @ 11:25

按照网上的教程,下载最新的libgdx库,

解压:-nightly-latest.zip.然后运行里面的工程生成工具。

D:\Java\libgdx-nightly-latest>java -jar gdx-setup-ui.jar

导入生成的工程,结果运行出错:

Exception in thread “LWJGL Application” com.badlogic.gdx.utils.GdxRuntimeException: com.badlogic.gdx.utils.GdxRuntimeException: is not supported by the video driver.
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:113)
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: OpenGL is not supported by the video driver.
at com.badlogic.gdx.backends.lwjgl.LwjglGraphics.createDisplayPixelFormat(LwjglGraphics.java:219)
at com.badlogic.gdx.backends.lwjgl.LwjglGraphics.setupDisplay(LwjglGraphics.java:181)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:122)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:110)
Caused by: org.lwjgl.LWJGLException: Pixel format not accelerated
at org.lwjgl.opengl.WindowsPeerInfo.nChoosePixelFormat(Native Method)
at org.lwjgl.opengl.WindowsPeerInfo.choosePixelFormat(WindowsPeerInfo.java:52)
at org.lwjgl.opengl.WindowsDisplay.createWindow(WindowsDisplay.java:229)
at org.lwjgl.opengl.Display.createWindow(Display.java:303)
at org.lwjgl.opengl.Display.create(Display.java:845)
at org.lwjgl.opengl.Display.create(Display.java:754)
at com.badlogic.gdx.backends.lwjgl.LwjglGraphics.createDisplayPixelFormat(LwjglGraphics.java:216)
… 3 more

遇到这个错误,解决办法很简单,到nvidia官方网站下载对应的opengl驱动即可:

https://developer.nvidia.com/opengl-driver

http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/opengl/4.3/306.63_desktop_win8_winvista_win7_64bit_international.exe

网上相关文章和讨论只说了显卡在十年前就支持Opengl了,却没提示用户该检查一下是否安装了显卡的OpenGL驱动。

参考:  http://code.google.com/p/libgdx/issues/detail?id=882

http://stackoverflow.com/questions/10972688/libgdx-exception-in-thread-lwjgl-application

http://code.google.com/p/libgdx/wiki/ProjectSetup

最新的非稳定包的下载地址:

http://libgdx.badlogicgames.com/nightlies/libgdx-nightly-latest.zip

 

 

没有评论 »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress