Hello Guest

A question about LWJGL.

  • 1 Replies
  • 147 Views
A question about LWJGL.
« on: November 06, 2019, 07:08:17 »
I have started developing a 2D game and hoped to use LWJGL, The LWJGL website seems to really advertise
using LWJGL3 so that's what I started using. I have worked in the past with LWJGL2.9 and understood it easily
using immediate mode and everything was fine back then.

Now the new LWJGL requires weird VAO and VBO which I understand what they are and what they do but it
seems really unintuitive as well as not very friendly to Java's Object Oriented approach.

There are barely any usable modern LWJGL3 tutorials that work and each one contradicts eachother so It's
a lot harder to learn how to use it properly than it should be.

I am looking for opinions on what I should do.
Is there any performance benefit from LWJGL3? Is it really worth the trouble?
(I am talking about a 2d pixelated game that will not require more than 60 fps and will contain multiple
moving objects as well as a camera that follows the player)
Why shouldn't I just work in LWJGL2 which seems to have a ton of tutorials, worked perfectly, managed to
run a complex game like Minecraft up until 1.13 perfectly even on potatoes.
Should I just abandon LWJGL?
If I should stay on LWJGL3, where can I find an example/tutorial that is good and works well for my situation?

Thanks for taking your time to read/help.

*

Offline KaiHH

  • ****
  • 207
Re: A question about LWJGL.
« Reply #1 on: November 06, 2019, 08:04:00 »
Let me start with an observation that we make with everyone new to LWJGL and/or OpenGL: Your problems/confusions stem from the fact that you confuse what LWJGL actually is and what information ("LWJGL tutorials") you are seeking.
LWJGL is a Java/native binding library (plus some infrastructure functionality such as loading native libraries and handling native memory). That means its primary focus lies on providing direct Java bindings for native libraries, such as OpenGL, GLFW, OpenAL, Vulkan and many others.

When you program against the OpenGL API, LWJGL itself does not require or make use of any particular style or version of OpenGL. You can decide whether you want to use immediate mode, retained mode, with or without shaders, etc.
Nothing in LWJGL will limit you to using any particular library or any way how to use a particular library, such as OpenGL.

The main lwjgl3-wiki GitHub page makes this also clear. Please read this thoroughly: https://github.com/LWJGL/lwjgl3-wiki/wiki#welcome