Usage of LWJGL 3

I have found out that there is a LWJGL 3 out there.
Has anyone searched its capabilities? Are there any advantages regarding to the old stuff?

For us not really atm, no.

There are some advantages, like better support for IME (typing special characters), HiDPI on Linux/Mac, NVIDIA Optimus integration, OpenGL ES on desktop, Wayland support, multiple contexts, possibly less bugs / issues since it is based on GLFW.

I have started working locally on improving our AwtPanel support so we no longer have to depend on LWJGL2’s Canvas support. LWJGL3 does not support AWT integration so this is the only blocking issue that’s preventing us from switching at the moment. Once that work is finished then writing a LWJGL3 backend should be trivial.


@Momoko_Fan Sounds nice. Did you succeed in implementing some Awt solution, or is there still a need to wait for a LWJGL side implementation?

It seems that the issue with AWT panel is really a bad API… What we are really looking for is something like the jME3 Canvas but without the disadvantages of Canvas, which are platform specific glitches. If we don’t have it, the SDK cannot work hence we cannot support LWJGL3, period.

I’m looking forward to multiple monitor support with LWJGL 3. I’m using a JmeCanvas now to put a fullscreen window on another display, which is working at the moment. However, I feel LWJGL 3 fullscreen output to another monitor is the more “straight-forward” approach.

1 Like

I am +100ing this question. Seeing it here not for the first time. The ability to have several windows and be able to fluently work with many monitors is fairly crucial for some applications where JME3 could shine. Like, I am creating a VJing app which is in a real need for such a feature… currently I am working around it with the clunky no-decoration-window approach, while in wait for the LWJGL3 support, but that is defenitely not a production-level solution. In the real world usage in studios or theatres, the monitor configurations can vary much between 2 and, say, 6 monitors, in different relations and positions. Being able to have many JME windows, to control what’s displayed in them and render different screens and controls of the workstation on them is one of the backbone parts of such an app. As well as for any other multimedia-rich app, not necessarily a game.


Well i need multi monitor support but apparently its only in alternate universe that people want that.

Hence the necromancy.

I also would really like lwjgl 3, since i have used it directly. I will look at the code. But it is probably more work reading a bunch of other peoples code rather than just doing it yourself. which i may end up doing.

This is the alternate universe the other people live in :stuck_out_tongue:

Not sure how working/complete it is though

1 Like

It works, although I had weird X11 errors on Linux due to the interaction between AWT and GLFW. The issues can be avoided by disabling the settings dialog or using Java 7 instead of 8.


How use it?

If you’re using the nightly builds via maven, replace the “jme3-lwjgl” artifact with “jme3-lwjgl3”.

I use gradle for build.

Gradle supports maven

1 Like

I have a problem with loading native libs =(

Mouse wheel doesn’t works in Ubuntu 14.04, because

 glfwSetScrollCallback(context.getWindowHandle(), scrollCallback = new GLFWScrollCallback() {
            public void invoke(final long window, final double xOffset, final double yOffset) {
                onWheelScroll(window, xOffset, yOffset);

yOffset always from -1.0 to 1.0

I have a problem with custom cursor. New buffer smaller than image buffer.

IntBuffer imageData = jmeCursor.getImagesData();
        ByteBuffer buf = BufferUtils.createByteBuffer(imageData.capacity());

It is fix

IntBuffer imageData = jmeCursor.getImagesData();
        ByteBuffer buf = BufferUtils.createByteBuffer(imageData.capacity() * 4);

Also, I have a problem with image of cursor. Cursor is reflected vertically.

Is that your code or code from the engine?

The first block of code was definitely wrong… but if it’s from the engine then it helps to know where. There’s a lot of code after all.

1 Like

This code in engine.

1 Like

LWJGL3 support is still beta. Just yesterday I noticed that joysticks were apparently non-functional…
For next release we are going to use JInput for both LWJGL2 and LWJGL3 to alleviate this.

1 Like