New LWJGL site

Started by spasi, November 14, 2014, 00:36:59

Previous topic - Next topic

spasi

The new LWJGL site and blog are now live. Enjoy!

ra4king

The stable build link for LWJGL 3 is broken. It throws an error in XML.
-Roi

spasi


erlend_sh

Looks great, stellar work guys! Like the logo as well; works nicely as a favicon.

TheBoneJarmer

Hey

I'm not certain if you are currently working on it, but I cannot see any text.

apostolos

Quote from: TheBoneJarmer on November 14, 2014, 19:31:48
Hey

I'm not certain if you are currently working on it, but I cannot see any text.
Can you try again please?

TheBoneJarmer

Yes, I can see it now. :) The site looks amazing! It really has matured a lot! I just have a couple of questions though. How much do I have to change to my code in order to get it to work with LWJGL3? I cannot find a complete overview for that but a guide with differences between version 2 and 3 would be nice.

spasi

More info will be added when the first official 3.0a is released, but for now, the biggest changes are related to the windowing system. The Display class and all input APIs are gone and have been replaced by GLFW. So, you probably want to get familiar with that API first, it's quite easy to get started.

Missing functionality includes OpenGL ES (and EGL), integration with Java windowing systems (parent to Canvas is gone, no applets, no JavaFX) and the util package.

GLFW can do anything LWJGL 2 could, except setting the window icon at runtime, which is coming soon. It can also do much more that LWJGL 2 couldn't.

TheBoneJarmer

Well, I started to learn OpenGL a couple of weeks ago and I really came far so just creating my own Display and Input classes is no problem. In fact, I think it is better this way. Now everyone can design their classes the way they prefer. So I guess it should not be that hard. ^^ But what is OpenGL ES for? Is it used for mobile games?

spasi

Yes, it's used by all kinds of embedded systems, including mobile devices.

iamcreasy

I am new to lwjgl. What's the improvement of lwjgl 3 over 2?

Kudos for the hard work.

Xpe

Hi, I'm new to forum but I'm always behind scene checking for updates.

I current have a simple Swing (with docking frames lib) editor with multiple lwjgl2 canvas and wonder if Javafx is still planned for v.3.

If JavaFx still planned do you think mixing Swing and Javafx will work out ?




iamcreasy

Quote from: iamcreasy on November 15, 2014, 19:08:08
I am new to lwjgl. What's the improvement of lwjgl 3 over 2?

Kudos for the hard work.

Found it. Source : https://github.com/LWJGL/lwjgl3/wiki/1.2.-Why-a-new-version

Why a new version

The LWJGL version 2 project is currently facing several issues that either require too much effort to be resolved, or simply cannot be fixed:

  • The project is already a decade old and the API has not evolved in a consistent or forward-looking way. Many new features have been added on top of a design that had different and much simpler goals in its initial form. A representative example is the Display API and its static nature, which prohibits the possibility of having multiple windows. Fixing that would break API compatibility by definition.


  • The implementation is a classic JNI-based Java library; there is a lot of functionality implemented in Java, but also a lot of details hidden in native code. Complexity is high and there are many non-trivial interactions between Java and native code. Functionality is spread over many different files, even for simple features. There is minimal type safety and there are often hard to track bugs. In the end, it took a lot of development effort to fix issues or add new features. It also made contributions that touched native code basically non-existent.


  • There is no clear separation of features. OpenGL is intermixed with the windowing system, desktop OpenGL is intermixed with OpenGL ES, support for AWT integration is intermixed with native windows, etc. Refactoring all that would be a huge undertaking.


  • The library includes functionality and APIs that simply should never have been added to it. Such functionality belongs either to an engine using LWJGL, or to another library layered on top of LWJGL. This includes the util package (vecmath, mapped objects, image/sound file readers, etc) and anything to do with applets.


  • The current template generator is using apt, which has been deprecated (in favor of javax.annotation.processing) in Java 7 and removed completely in Java 8. Even though it can still do some pretty powerful transformations, it has started showing its age as well. The implementation itself is insanely complex and new features are very hard to add without breaking existing functionality. The use of Java interfaces and annotations makes writing templates unnecessarily hard and limits new features. The lack of type safety also makes it very hard to validate templates without actually inspecting or testing the resulting code.


  • The library is not modularized at all. For example, it's not possible to build LWJGL without OpenCL support if it's not needed. The build scripts would have to be rewritten to support something like that.


  • There are no unit-tests. Even if there were, it would be very hard to isolate and test specific functionality of the current codebase.

spasi

Quote from: iamcreasy on November 17, 2014, 01:56:05Found it. Source : https://github.com/LWJGL/lwjgl3/wiki/1.2.-Why-a-new-version

Thank you iamcreasy. I've now added links to the Roadmap and Why-a-new-version on the LWJGL site.

Quote from: Xpe on November 16, 2014, 16:43:14I current have a simple Swing (with docking frames lib) editor with multiple lwjgl2 canvas and wonder if Javafx is still planned for v.3.

If JavaFx still planned do you think mixing Swing and Javafx will work out ?

Hey Xpe. I would love to have JavaFX integration in LWJGL 3 (not sure if you've seen this), but I'm afraid it's not a priority right now. The technical hurdles remain and I'm not sure if it's worth investing in an implementation that we know won't perform well. There are a two viable solutions:

- Oracles decides to expose implementation details. This would be ideal, but I don't think it'll ever happen.
- We hack our way inside JavaFX, expose the details ourselves via reflection/etc. This could work (with a lot of pain I imagine), but it will necessarily be only compatible with particular JDK releases. A nightmare for maintenance.

Mixing JavaFX with Swing depends on how the above is implemented. No way to tell now. In any case, I would advice against it, JavaFX and AWT/Swing are entirely different beasts.

Xpe

Quote from: spasi on November 17, 2014, 11:15:42
Quote from: iamcreasy on November 17, 2014, 01:56:05Found it. Source : https://github.com/LWJGL/lwjgl3/wiki/1.2.-Why-a-new-version

Thank you iamcreasy. I've now added links to the Roadmap and Why-a-new-version on the LWJGL site.

Quote from: Xpe on November 16, 2014, 16:43:14I current have a simple Swing (with docking frames lib) editor with multiple lwjgl2 canvas and wonder if Javafx is still planned for v.3.

If JavaFx still planned do you think mixing Swing and Javafx will work out ?

Hey Xpe. I would love to have JavaFX integration in LWJGL 3 (not sure if you've seen this), but I'm afraid it's not a priority right now. The technical hurdles remain and I'm not sure if it's worth investing in an implementation that we know won't perform well. There are a two viable solutions:

- Oracles decides to expose implementation details. This would be ideal, but I don't think it'll ever happen.
- We hack our way inside JavaFX, expose the details ourselves via reflection/etc. This could work (with a lot of pain I imagine), but it will necessarily be only compatible with particular JDK releases. A nightmare for maintenance.

Mixing JavaFX with Swing depends on how the above is implemented. No way to tell now. In any case, I would advice against it, JavaFX and AWT/Swing are entirely different beasts.

Hi spasi, thanks for clarification.

I had made a simple libgdx port with your demo (here) but didnt go further because of performance overhead you said in notes.

I'm really looking forward for lwjgl3 with GLFW 3.1 stuff ^^

Maybe by the time 3.1 is released there will be a solution to use it with a GUI framework.