Hello Guest

Display class

  • 4 Replies
  • 8232 Views
Display class
« on: December 04, 2014, 17:10:39 »
Hello!

I just downloaded LWJGL from the download page (the stable version), then I hooked it up to my Eclipse IDE with this guide.

I ran the sample code given on the website here. Everything seems to be running fine, no problems here.

The thing is, now I'm actually trying to make sense of the code itself, and lots of information I seem to be finding on the internet points to the Display class (org.lwjgl.opengl.Display). Now here's the problem, I don't seem to have a Display class, and for that matter, the sample code doesn't make use of it either.

So I was wondering, can someone point me to the obviously very silly thing I must have done somewhere? Where has this Display class gone to?

*

Offline spasi

  • *****
  • 2261
    • WebHotelier
Re: Display class
« Reply #1 on: December 04, 2014, 17:29:50 »
LWJGL has been redesigned completely in version 3, the Display class from LWJGL 2 is gone. Everything related to the Display, keyboard/mouse input and controllers has now been replaced with the GLFW library. The sample code on the website uses GLFW to create a window and then render with OpenGL.

You won't find information on LWJGL 3, it has not even been released officially. But you will find plenty of info on GLFW.

Re: Display class
« Reply #2 on: December 04, 2014, 20:41:14 »
Hmmm, I started suspecting it had something to do with different versions. So I take it I took the absolute worst time to get into this library. ::)
Well thank you for the explanation at any rate. So would you think it's a good idea to already get into GLFW, or is it better to wait for the official LWJGL 3 release?

*

Offline spasi

  • *****
  • 2261
    • WebHotelier
Re: Display class
« Reply #3 on: December 04, 2014, 20:59:21 »
GLFW is stable and production-ready. LWJGL 3's bindings are also stable, meaning that everything supported right now will not be any different in the official release. There might be some changes in the non-binding functionality, but that API surface is so small that it shouldn't be a problem for any early-adopting users.

The first LWJGL 3 alpha release is planned to happen when GLFW 3.1 is released.

Re: Display class
« Reply #4 on: December 05, 2014, 13:50:01 »
I'm using LWJGL3 since it was available for downloading. I think I'm as far as you are. I got some stuff done in LWJGL2 but up till now I have no regrets jumping towards LWJGL3. It's stable enough as it is. I really like GLFW. Removing the Display and Input classes was strange at first, but creating your own using GLFW is a piece of cake.

Also, as a Ubuntu 14.04 LTS user. Going fullscreen is easy. And I mean entirely fullscreen because it was a pain in the ass doing so with the old Display class. I really recommend moving forward. Besides that, GLFW handles more than just Display and Inputs. Multiple windows (for those who game with more than 1 monitor), Joysticks, etc.

One more thing though, the GLUT library is gone in LWJGL3. Sure it's strange since it made things so easy but it turns out it's for the best. It was not that difficult in the end to do stuff yourself anyway.