[EDIT:]I apologize.This topic is not helpful at all. I really think its better to delete this, than propably causing flame-wars or whatever. If I would write another topic about JogAmp, LWJGL will not be discussed.I hope you understand, and I hope this will be deleted soon...

why did you choose that only-static lib LWJGL? Object-orientation is awesome.

LWJGL is static-only because it allows you to copy-and-paste sourcecode from C to Java, using static imports. This is very convenient and allows you to keep your code 'clean', but not having to pass a 'gl' instance around in every remote corner of your app. IMHO this is still the way to go, and is actually how the OpenGL API was designed. Don't expect to use JOGL and be able to interleave calls to different 'gl' instances: you still have to manage contexts yourself. Behind the scenes, JOGL simply makes static (native) calls to OpenGL, just like LWJGL.

Indeed, OpenGL is not an object-oriented API. We mapped it directly so you could invent your own object-oriented abstraction for it. However, as this is not how graphics drivers or hardware works, it is probably not so wise to do it. Creates ugly as hell code too.

As this thread is likely to spiral out of control, not in the last place due to statements like: "In the end I'd say LWJGL is good for Java-newbes", I think it's best to urge everybody to only reply to factual statements, ignoring any strong subjective statements that might be posted. Otherwise this thread will be locked quickly.

Hi, appreciate more people! Σ ♥ = ¾Learn how to award medals... and work your way up the social rankings!

LWJGL is static-only because it allows you to copy-and-paste sourcecode from C to Java, using static imports. This is very convenient and allows you to keep your code 'clean', but not having to pass a 'gl' instance around in every remote corner of your app. IMHO this is still the way to go, and is actually how the OpenGL API was designed. Don't expect to use JOGL and be able to interleave calls to different 'gl' instances: you still have to manage contexts yourself. Behind the scenes, JOGL simply makes static (native) calls to OpenGL, just like LWJGL.

I like the static API of LWJGL but sometimes I find it awkward to remember which version of opengl the function was defined in (choosing between GL11, GL15, etc.) while having a GL object allows inheritance to define the different opengl versions (and to remove functionality in the case of moving to Opengl 3+).

One thing that I've always been confused about in both JOGL and LWJGL is what happens when an ARB function is invoked. In JOGL, the API doesn't even expose ARB so I'm assuming that it must do something like GLEW and calls the ARB version if no core function is available. With LWJGL, both the ARB and core functions can be called explicitly in Java but if I call the ARB and the core is available, will it upgrade and call the core function?

With LWJGL, both the ARB and core functions can be called explicitly in Java but if I call the ARB and the core is available, will it upgrade and call the core function?

LWJGL does nothing but wrap calls.

When you call the ARB version, like glBufferSubDataARB(...), the ARB version is called in OpenGL.When you call the core version, like glBufferSubData(...), the core version is called in OpenGL.

Worth noting is that there won't be a difference between them as long as both are supported and the function/constant names are identical (except for the added suffix (ARB, EXT, etc)). Of course it does not make sense to use both the core AND the extension version of a feature. It should be safe to use OpenGL 2 (shaders, multitexturing, VBOs) on 99% of all computers. If you want FBOs, the extension is supported by OpenGL 2 hardware, but it was only promoted to core in OpenGL 3.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org