使用LibGdx / Eclipse在桌面上启动Java应用程序时出错 [英] Error when launching Java app on desktop using LibGdx/Eclipse

查看:329
本文介绍了使用LibGdx / Eclipse在桌面上启动Java应用程序时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用LibGdx开发基于Java的游戏。我还没有决定是否要将游戏部署在Android或PC上,所以我想我至少可以在桌面上开发+测试,然后决定。我以前使用过LibGdx,它工作得很好..但是在我完成系统擦除之前(我每年都喜欢做几次)。



无论如何,当我尝试在Eclipse中启动游戏作为Java应用程序时,我收到以下错误:



- 线程中的异常LWJGL应用程序com.badlogic.gdx.utils.GdxRuntimeException:视频驱动程序不支持OpenGL。



- 导致:org.lwjgl.LWJGLException:像素格式不加速



显然这是由我的GPU造成的,所以我安装了最新的驱动对于我的(集成)视频芯片,但没有骰子。任何人都知道这个像素格式的一部分?我没有真正完成任何代码,但我只是有一个空白的应用程序,我试图在我的电脑上显示。

解决方案

尝试给Jogl后端。仔细检查你的司机。你有什么GPU?


I'm using LibGdx to develop a Java-based game. I haven't decided whether I want the game to be deployed on Android or PC, so I figured I can at least develop+test on desktop and then decide. I've used LibGdx before and it worked fine.. but that must been before I did a complete system wipe (as I like to do a few times per year).

Anyhow, when I try to launch the game in Eclipse as "Java Application" I get the following errors:

-Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: OpenGL is not supported by the video driver.

-Caused by: org.lwjgl.LWJGLException: Pixel format not accelerated

Clearly this is caused by my GPU.. so I installed the latest drivers for my (integrated) video chip, but no dice. Anyone know anything about the "Pixel format" part of this? I haven't really done anything code-wise yet, I just have a blank application that I'm trying to get to display on my PC.

解决方案

Give the Jogl backend a try. Double check your drivers. What GPU do you have?

这篇关于使用LibGdx / Eclipse在桌面上启动Java应用程序时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆