线程“LWJGL 应用程序"中的 libGDX 异常

libGDX Exception in thread quot;LWJGL Applicationquot;(线程“LWJGL 应用程序中的 libGDX 异常)
本文介绍了线程“LWJGL 应用程序"中的 libGDX 异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在关注以下位置的设置教程:libGDX 设置教程.我不确定这里发生了什么.我终于可以在模拟器中部署该项目,但是,桌面版本不太好用.我已经获取了 gdx-backend-jogl.jar 和本机 jogl 的副本,但它似乎仍然给出了相同的错误.

I've been following the setup tutorial found at: libGDX setup tutorial. I'm not sure what's going on here. I can finally get the project to deploy in the emulator, however, the desktop version is not quite working. I've grabbed a copy of both gdx-backend-jogl.jar as well as the native jogl and it still seems to give the same error.

我已经查看了以下线程,并认为我可以将 jogl jar 文件从 libgdx nightly latest 文件夹复制到 my-gdx-game-desktop 项目中的 libs 文件夹中 --- 但这并没有工作:使用 LibGdx/在桌面上启动 Java 应用程序时出错/日食

I've i have viewed the following thread and thought i could just copy the jogl jar files from the libgdx nightly latest folder into the libs folder within the my-gdx-game-desktop project --- but this didn't work: Error when launching Java app on desktop using LibGdx/Eclipse

有没有人知道我该如何解决这个问题?

Does any have any ideas as to how i could fix this?

控制台转储

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:198)
        at com.badlogic.gdx.backends.lwjgl.LwjglGraphics.setupDisplay(LwjglGraphics.java:160)
        at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:139)
        at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:131)
    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:214)
        at org.lwjgl.opengl.Display.createWindow(Display.java:306)
        at org.lwjgl.opengl.Display.create(Display.java:873)
        at org.lwjgl.opengl.Display.create(Display.java:782)
        at com.badlogic.gdx.backends.lwjgl.LwjglGraphics.createDisplayPixelFormat(LwjglGraphics.java:186)
        ... 3 more
    AL lib: ReleaseALC: 1 device not closed

推荐答案

您缺少支持 OpenGL 的卡.Libgdx 在桌面上至少需要 OpenGL 1.5(用于 OpenGL ES 1.x 仿真,2.1 用于 OpenGL ES 2.0 仿真).

You are lacking an OpenGL capable card. Libgdx requires at least OpenGL 1.5 on the desktop (for OpenGL ES 1.x emulation, 2.1 for OpenGL ES 2.0 emulation).

要么安装最新的驱动程序,要么如果您的卡不支持 OpenGL,请换一张新卡.10 年前的显卡支持 OpenGL 1.5.

Either install up to date drivers, or if your card does not support OpenGL, get a new card. OpenGL 1.5 is supported by 10 year old graphics cards.

这篇关于线程“LWJGL 应用程序"中的 libGDX 异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

How to target newer versions in .gitlab-ci.yml using auto devops (java 11 instead of 8 and Android 31 instead of 29)(如何在.gitlab-ci.yml中使用自动开发工具(Java 11而不是8,Android 31而不是29)瞄准较新的版本)
Android + coreLibraryDesugaring: which Java 11 APIs can I expect to work?(Android+core LibraryDesugering:我可以期待哪些Java 11API能够工作?)
How to render something in an if statement React Native(如何在If语句中呈现某些内容Reaction Native)
How can I sync two flatList scroll position in react native(如何在本机Reaction中同步两个平面列表滚动位置)
Using Firebase Firestore in offline only mode(在仅脱机模式下使用Firebase FiRestore)
Crash on Google Play Pre-Launch Report: java.lang.NoSuchMethodError(Google Play发布前崩溃报告:java.lang.NoSuchMethodError)