本文介绍了无法找到LWJGL Display类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经将LWJGL安装到Java项目中,我无法导入Display类。

I have installed LWJGL into a Java project, and I can't import the Display class.

import org.lwjgl.opengl.display;

给出无法解决的错误。

DisplayMode和其他类也缺失。我在broswer中找不到任何一个。

DisplayMode and other classes are also missing. I can not find any of them in the broswer.

推荐答案

显示器,键盘,鼠标等旧的实用程序类已被删除在LWJGL3中删除。该库现在使用进行窗口管理,这更复杂但据说具有更好的性能和更多功能。与OpenGL方法一样,所有glfw方法都是静态的,可以在org.lwjgl.glfw.GLFW类中找到。

The old utility classes like Display, Keyboard, Mouse etc. have been removed in LWJGL3. The libary now uses GLFW for window management, which is more complicated but said to have better performance and more features. Like with OpenGL methods, all glfw methods are static and found in the org.lwjgl.glfw.GLFW class.

不幸的是,因为LWJGL3仍在开发中,所以没有很多教程都在那里。你可以在这里找到一个(未完成的):。或者,您也可以查看,其中提供了一些示例。

Unfortunately, because LWJGL3 is still in development, there aren't many tutorials out there. You can find one (unfinished) here: https://github.com/SilverTiger/lwjgl3-tutorial/wiki. Alternatively you can also look through the documentation, which provides some examples.

编辑:截至2015年3月,有一个新的提供了对LWJGL3的良好介绍。

As of March 2015, there is a new unofficial tutorial series that provides a good introduction to LWJGL3.

编辑:截至2015年9月,正在进行中。

As of September 2015, a migration guide from LWJGL2 to LWJGL3 is in progress.

这篇关于无法找到LWJGL Display类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-17 02:15