Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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

import org.lwjgl.opengl.display;

Gives a cannot be resolved error.

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
428 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.

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.

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

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...