Hello Guest

LWJGL 2 migration guide to LWJGL 3

  • 5 Replies
  • 36881 Views
*

Offline spasi

  • *****
  • 2261
    • WebHotelier
LWJGL 2 migration guide to LWJGL 3
« on: September 03, 2015, 09:55:10 »
If you'd like to port your existing LWJGL 2 code to LWJGL 3, please read:

The LWJGL 3 Migration Guide
« Last Edit: September 03, 2015, 10:00:57 by spasi »

Re: LWJGL 2 migration guide to LWJGL 3
« Reply #1 on: November 01, 2015, 16:54:36 »
Can I embed LWJGL3 in awt.Canvas still? Will this be supported eventually?

My GUI is done in swing and I've invested a large amount of effort into it. I want to upgrade to LWJGL3 for the multi-display through GLFW, but that won't matter if I can't put it in my swing because of it.  Is upgrading the right choice for me?

https://www.reddit.com/r/LWJGL/comments/3r1we3/making_a_game_afraid_of_going_too_far_down_wrong/

*

Offline spasi

  • *****
  • 2261
    • WebHotelier
Re: LWJGL 2 migration guide to LWJGL 3
« Reply #2 on: November 02, 2015, 17:34:29 »
There is no AWT integration in LWJGL 3 and there are no plans to add it later. You can find some old posts in this forum that explain why.

We currently have an open issue for a GUI solution in LWJGL 3, but it is not a showstopper in any way. We'll gladly accept any robust and low-maintenance solution. Having multiple solutions for different needs is OK too.

Technically, LWJGL 2's AWT integration could probably be implemented in terms of LWJGL 3. If anyone would like to contribute something, I'll make sure any required changes to LWJGL 3 will be accepted (should be few/minor).

I have personally made some progress with an LWJGL-backed JavaFX pipeline, here.

Re: LWJGL 2 migration guide to LWJGL 3
« Reply #3 on: November 03, 2015, 04:30:35 »
That's what I was afraid of. Making one myself is beyond my skill set. My realistic choices are to LWJGL2+swing, or LWJGL3+some GUI library. Before I settled on swing (probably a mistake in retrospect) I experimented with some of these.  But if I understand correctly, none of them would work with LWJGL3 currently.

*

Kai

Re: LWJGL 2 migration guide to LWJGL 3
« Reply #4 on: November 03, 2015, 09:05:55 »
I am planning to do what @Spasi proposed: Taking the good and working classes from LWJGL2, which do OpenGL context creation themselves via JNI, and porting them to the native platform API exposed as Java methods by LWJGL3. This should not be too much work, as it is mostly changing the names of referenced exception types and utility methods and classes which moved/changed/have been removed.
Although I would favor a clean solution for context and window creation (whatever "clean" means in this context). But this will distill itself, I guess, from the AWT and coming SWT implementations.

*

Offline Cornix

  • *****
  • 488
Re: LWJGL 2 migration guide to LWJGL 3
« Reply #5 on: November 03, 2015, 09:53:46 »
I have been working on a GUI library for about a year now. The library is completely platform independent and thus could be used with LWJGL 3. Unfortunately progress is slow and it is not on the same level as Swing by far. Perhaps I am going to publish it here some day.