-4
\$\begingroup\$

I was wondering what the difference was between LWJGL, Slick2D, and OpenGL.

If I'm not mistaken LWJGL is a library and it has the methods and such, but what are the other two for and how do they use each other.

Is Slick2d and OpenGL the same and they both use the LWJGL?

\$\endgroup\$
6
  • \$\begingroup\$ OpenGL is a low-level hardware-abstraction API. The other two use it, not the other way around. \$\endgroup\$ Jul 16, 2013 at 16:22
  • 3
    \$\begingroup\$ -1 for lack of research. Just looking at the names of these would have given you some pretty solid leads on what they were. Further, just reading their descriptions tell you what they use and what they're used for. \$\endgroup\$
    – House
    Jul 16, 2013 at 16:44
  • \$\begingroup\$ You say that I did no research when you answer was completely wrong. \$\endgroup\$ Jul 16, 2013 at 16:46
  • 3
    \$\begingroup\$ @user2526311 Byte56 did research; just missed a small detail. The fact something was wrong is not an indication of lack of research. 30 seconds on google could have answered this \$\endgroup\$
    – Outurnate
    Jul 16, 2013 at 16:57
  • 2
    \$\begingroup\$ @user2526311 By the way, welcome to the site. Please note the changes I made to your question. Asking "which is better" or if there's "anything else game dev related" you should know, are questions that either only solicit opinions, or are far too broad. See the help center for more details about using the site. \$\endgroup\$
    – House
    Jul 16, 2013 at 17:04

4 Answers 4

4
\$\begingroup\$

You understood everything wrong. OpenGL was the first to come out. It is a low-level API that controls the GPU and such. You can work with it directly from C/C++. The name comes from Open Graphics Library.

LWJGL is a binding of OpenGL to Java, so you can use OpenGL without having to mess with unmanaged C code. The name comes from Light Weight Java Game Library.

Slick2D is just a library that may use OpenGL as its backend to support accelerated 2d graphics.

Edit: Against what other people said, read here: http://slick.ninjacave.com/ LWJGL does not use Slick2D, Slick2D uses LWJGL. And if I'm not mistaken, you can use other OpenGL bindings for Java on it too.

Slick2D is just a framework, it needs some way to get the graphics working, for this it uses a OpenGL Java binding. In this case, LWJGL. You can use LWJGL alone, but it's highly recommended that you use Slick2D too, because it will be much easier to deal with things, since OpenGL is just too broad, it will give you the tools and only this. Slick2D uses this tools to focus all them on accelerated 2D rendering.

\$\endgroup\$
2
  • \$\begingroup\$ Does Slick2D also use the LWJGL? And does that mean I don't need Slick2D at all? Is it recommended I use it? \$\endgroup\$ Jul 16, 2013 at 16:32
  • \$\begingroup\$ @user2526311 see my new edit \$\endgroup\$ Jul 16, 2013 at 16:35
1
\$\begingroup\$

LWJGL is a library. Slick2D is a library. OpenGL is a library.

All three are libraries.

Slick2D uses LWJGL (and both are frequently used at the same time), both LWJGL and Slick2D use OpenGL.

\$\endgroup\$
2
  • \$\begingroup\$ Oops, not quite right! slick.ninjacave.com "Slick2D is an easy to use set of tools and utilites wrapped around LWJGL OpenGL bindings to make 2D Java game development easier." slick2d uses lwjgl, not the other way around. \$\endgroup\$ Jul 16, 2013 at 16:28
  • 1
    \$\begingroup\$ True enough, I'll fix that. \$\endgroup\$
    – House
    Jul 16, 2013 at 16:41
0
\$\begingroup\$

OpenGL is low level API that controls the hardware whereas the LWJGL just binds the OpenGL to java to make it easier to use.

\$\endgroup\$
0
\$\begingroup\$

In short, OpenGL is basically what the other two are built on. It has methods and classes that might come in handy, but I don't suggest using that.

LWJGL is extremely powerful, but it's not too good for if you just want to write simple games. You'll end up reinventing the wheel by making your own methods to support those of LWJGL. It will come in handy though, for if you want to use 3D graphics, but if your program only uses 2D graphics, I suggest Slick2D.

Slick2D is fast and powerful for 2D graphics. It's relatively easy and if you're looking to just write a simple game using 2D graphics only, I recommend Slick2D.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .