LibGDX and 3D?

Anything libgdx related goes here!

LibGDX and 3D?

Postby Eamonn » Tue Aug 06, 2013 10:06 pm

So, LibGDX is mostly used for 2D game development as far as I've seen. Now, let's forget about Android and iOS and the Web(in other words, GLES and WebGL) and focus on OpenGL for a second. LibGDX for the desktop is based on LWJGL(Even though I do like LibGDX, I want to learn LWJGL. Why? I'm not entirely sure), and LWJGL is fine for 3D as long as you render correctly(Not pointing any fingers at any games that may start with a Mine and end with a Craft). BUT(and this is a big but(Michael Rosen quote)), LibGDX and 3D is meant to be a "Work in Progress". So this confused me: If LibGDX is based on LWJGL, that would mean LibGDX makes it easier to use LWJGL, but also it does not remove any functionality. If LWJGL can handle 3D no problem, then why can't LibGDX? I don't know the in's and out's of LWJGL, OpenGL or LibGDX, but it doesn't take a genius to work out there's something wrong here.

Maybe I'm wrong, but I just got curious. This is the right section for this, isn't it? I believe it would be, because it's related to LibGDX.

Thanks!
Currently working on my game using LibGDX for Desktop/Android/iOS/OUYA.
Eamonn
 
Posts: 123
Joined: Mon Jun 17, 2013 4:17 pm

Re: LibGDX and 3D?

Postby dermetfan » Wed Aug 07, 2013 12:58 am

LibGDX can handle 3D. The API to make the use of LWJGL/OpenGL easier is just rather small, as it's a work in progress. You can, however, access the LWJGL and OpenGL classes directly. OpenGL via Gdx.glXX, LWJGL using the LWJGL backend. I don't guarantee for any of this though.
dermetfan
 
Posts: 283
Joined: Fri May 03, 2013 8:57 pm

Re: LibGDX and 3D?

Postby Lestat » Wed Aug 07, 2013 1:48 am

3d api is most complete. i'm not really sure whats left though.
My Games: Zoryth Games My Blog: The Monster
Lestat
 
Posts: 504
Joined: Thu May 16, 2013 5:41 am
Location: Hogwarts

Re: LibGDX and 3D?

Postby davedes » Wed Aug 07, 2013 2:22 am

LWJGL is bare-bones. It's just a wrapper around OpenGL rendering and a window or fullscreen display. If you want to develop a game, you will need to pretty much write all the things that LibGDX has already implemented for you. A very short list, to give you a broader idea of the challenge involved in "pure LWJGL/OpenGL" gamedev:

- Vector math (LibGDX uses JNI)
- Image and sound decoding
- Sprite batching, shader utilities, and vertex utilities
- 2D GUI toolkit (this in itself is a huge undertaking)
- Asset management and dependencies (also very complex)
- Font rendering/parsing
- 3D scenegraph and shader management (LibGDX's 3D api handles this)
- Camera, texture, input, and various other utilities

On top of all that, LibGDX implements this for far more platforms than LWJGL, allowing you to port it easily if needed.

So, I would recommend to stick with LWJGL. Whether you want to use pure GL calls, or make use of LibGDX's utilities like ShaderProgram and Mesh, or even take a higher-level approach and use the new 3D API and shader managers, either choice would be more suitable than pure LWJGL.
davedes
 
Posts: 433
Joined: Thu Oct 11, 2012 7:51 pm


Return to Libgdx

Who is online

Users browsing this forum: Google [Bot], HD_92 and 9 guests