Difference between lwjgl and...

I was looking at the site and it looks like lwjgl is just jogl, joal, and jinput. Is there anything else in lwjgl?

I don’t see why I shouldn’t just use jogl, joal and jinput by themselves. It looks to me like lwjgl is just packaging a bunch of things together. :-/

did you read: http://lwjgl.org/about.php ?

LWJGL provides what JOGL et al does - however it differs in being able to be natively compiled, and have fewer bugs ::slight_smile: , easier api, A LOT smaller - and other features… I am on my way home from work - hope someone chimes in with more :slight_smile:

uh, and we’re quite active in irc://irc.freenode.net/lwjgl :slight_smile:

/me heads home

LWJGL is a much cleaner, simpler, and easier to use API (IMHO). It’s been around much longer and is very actively developed. Its intended target is writing professional games.

In the end you have to try both APIs out to decide which makes more sense for you.

Right now LWJGL is in beta. Version 1.0 should be out in a few months, and will feature complete documentation. And hopefully a properly working Mac port.

Cas :slight_smile:

??? I thought it wasn’t possible to use LWJGL with a GUI toolkit (AWT, Swing or SWT). That would be the kind of “major difference” worth speaking of…

But I may be wrong : last time I checked LWJGL it was the 0.7 version and you have done a great job since :slight_smile:

[quote]??? I thought it wasn’t possible to use LWJGL with a GUI toolkit (AWT, Swing or SWT). That would be the kind of “major difference” worth speaking of…

But I may be wrong : last time I checked LWJGL it was the 0.7 version and you have done a great job since :slight_smile:
[/quote]
Hehe, someone (fbi) has just release the beta source code of a SWT implementation ! Yes, that’s right, you can use Lwjgl with SWT (and AWT if you want but you have to code it yourself…) but it still in beta stage ! Take a look at this thread :
http://64.5.48.50/forums/viewtopic.php?t=541

Chman :wink:

Thanks Chman, I’ll give it a look :smiley:

With the changes made in 0.9, that makes LWJGL more and more attractive.

I’m thinking that it should be pretty easy to use LWJGL with JOGL too with the new context adapter stuff. But no-one’s tried it yet.

Cas :slight_smile:

[quote]I’m thinking that it should be pretty easy to use LWJGL with JOGL too with the new context adapter stuff. But no-one’s tried it yet.

Cas :slight_smile:
[/quote]
I’ve tried to use the new GLContext class but it doesn’t work like I want (:P)… How do you use it ? Because I’ll need it in a few days :slight_smile:

Basically, imagine you’ve got a JOGL context all nicely set up, and you’re being asked to render something by AWT using JOGL, so you’re in the correct thread. Right at the start of your paint method you do:


GLContext.useContext(joglGL);

and then you can just call LWJGL methods. Theoretically.

Cas :slight_smile:

Thnaks now it works perfectly ! I can use Lwjgl with Jogl ! But it’s useless ;D

Here is the piece of code to change in a Jogl application :


public final void display(GLDrawable gLDrawable)
{
      final GL gl = gLDrawable.getGL();
      GLContext.useContext(gl);

      glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
      glLoadIdentity();

        // Drawing here...
}

Don’t forget to import lwjgl (on the code below I’ve used static imports)…
Note: you can also use :


      GLContext.useContext(gLDrawable);

but it makes my code crash sometimes…

Hope it will help someone !

Chman