Learning LWJGL/JOGL to C++ with OpenGL

Hello,

Which library (LWJGL/JOGL) shall I learn before I move on to using C++ with OpenGL/SDL? I want to know which of these two are probably the best and most similar to OpenGL in C++ so I can eventually move on to that with OpenGL, after of course have a skills in C++.
Currently I have some basic knowledge in C++, but at the moment I’m most comfortable and experienced with Java.

Thank you kindly.

LWJGL utilizes JOGL so it’s kind of a wash in respect to which one is more similar to the C++ version of the graphics libraries. LWJGL is a game library so it has a lot of extras that probably won’t be available when you make the jump to C++. You could always try pairing up JOGL with something like SDL4Java or a similar set of bindings if you want to keep things as close as possible between your target languages.

A lot of extras is a relative opinion… It definitely still is a low level library!

Honestly, the functions should be the same for the most part in C++, except you’ll have pointers which will take away a lot of the steps you have to take with Java. Other than that, it really shouldn’t be that different. If you use GLUT, functions will be vastly different.

Actually, no. LWJGL and JogAmp are 2 distinct sets of Java bindings for several APIs including OpenGL, OpenGL-ES, OpenAL (OpenAL-Soft too) and OpenCL, they both have their own windowing toolkit(s), their APIs above the bindings. LWJGL and JogAmp share a very few classes (GLU Java implementation, …). There are already tons of threads about the comparison between them, the pros and cons.

When you jump to C++, why not using SFML rather than SDL?

Stick with whatever language works for you. If you’re making your AAA 3D game and you notice that Java is too slow, than jump to C++. But you probably won’t be making AAA games anyway. If you’re comfortable with Java, just stick with it.

If you like to play with other people’s features, you should try libGDX. I love to be able to draw stuff onto the screen with OpenGL without any other abstractions, so I use LWJGL. It’s almost the same as C++. LibGDX is a not an API, it is more like game framework.

If you still plan to jump into C++ for some reason, and you want your skills to be as compatible with other languages as possible, you should probably choose LWJGL.

EDIT:

I haven’t tried using JOGL, but I wanted to test is at some time. My journey ended once I realized you need to do a lot of stuff manually. Anyway, stop planning. Start doing. If you learn using LWJGL, your skills won’t go to waste.

Go with LWJGL. If you use static imports with the GL classes, your OpenGL code almost looks identical to the C/C++ counterpart.

I stand corrected. I could have sworn that I’d read that LWJGL utilized JOGL last time I went investigating libraries. It appears that my memory isn’t what it used to be. :persecutioncomplex:

Thank you all for your reply. I really appreciate it. I will go with LWJGL.

Thanks!

Absolutely right! :wink: