LWJGL Forum

Programming => General Java Game Development => Topic started by: Yemto on February 14, 2014, 11:15:06

Title: Wait for lwjgl 3 or not
Post by: Yemto on February 14, 2014, 11:15:06
I'm currently working on my first 3D java game, and after talking about it in forums people strongly suggest lwjgl, and that's why I'm here. I want to create a game which have multi monitor/window support. After some research I have come to the conclusion that it's impossible to do with lwjgl 2. But will be a feature in lwjgl 3. So, what should I do. Should I start programming my game with lwjgl 2 and then risking needing to reprogram it once lwjgl 3 is out, or just wait? I have looked for a release date of 3. But have only manage to find that 3 won't be compatible with 2.
Title: Re: Wait for lwjgl 3 or not
Post by: kappa on February 14, 2014, 11:39:31
I'd say go with LWJGL 2 for now, the GL component of LWJGL 3 will be largely the same as LWJGL 2, the only code you'd need to rewrite is the windowing and input code which shouldn't be much work or take very long to port over (its only a handful of api calls anyway).
Title: Re: Wait for lwjgl 3 or not
Post by: Cornix on February 14, 2014, 11:43:14
Sorry for hijacking, but what exactly is going to change about the input-API?
Title: Re: Wait for lwjgl 3 or not
Post by: kappa on February 14, 2014, 11:53:07
Sorry for hijacking, but what exactly is going to change about the input-API?
It shouldn't be vastly different from what we have now, but due to supporting input from multiple windows it'll have to be a little different as the current static API won't cut it.
Title: Re: Wait for lwjgl 3 or not
Post by: Cornix on February 14, 2014, 12:18:40
Okay, that makes sense. Thanks for the information.
Title: Re: Wait for lwjgl 3 or not
Post by: Evil-Devil on February 18, 2014, 15:20:07
I'd say go with LWJGL 2 for now, the GL component of LWJGL 3 will be largely the same as LWJGL 2, the only code you'd need to rewrite is the windowing and input code which shouldn't be much work or take very long to port over (its only a handful of api calls anyway).
That is good to know. So the rest of the static nature will likely be the same, right? :)
Title: Re: Wait for lwjgl 3 or not
Post by: ra4king on April 30, 2014, 20:05:48
I'd say go with LWJGL 2 for now, the GL component of LWJGL 3 will be largely the same as LWJGL 2, the only code you'd need to rewrite is the windowing and input code which shouldn't be much work or take very long to port over (its only a handful of api calls anyway).
That is good to know. So the rest of the static nature will likely be the same, right? :)
Yes, the GL/AL/CL functions will be static still.
Title: Re: Wait for lwjgl 3 or not
Post by: matanui159 on May 02, 2014, 12:03:51
Just one question while this topic is active...

How will the GL methods be static with multiple windows?
Because you would want different things drawn on each window...
Title: Re: Wait for lwjgl 3 or not
Post by: spasi on May 02, 2014, 13:23:51
All GL methods are called on the context that is current in the current thread. This is always true, whether you have a single or multiple windows. If each window has its own context and its own rendering thread, then it just works. If we have a single thread but multiple contexts, MakeCurrent must be used.

Btw, this isn't new to LWJGL 3, the same restrictions apply to LWJGL 2.
Title: Re: Wait for lwjgl 3 or not
Post by: matanui159 on May 07, 2014, 06:25:00
So like a window per thread...

And to have multiple windows on one thread you have to call 'makecurrent' before drawing to a certain window...