libgdx from scratch

Today i reimplemented libgdx from scratch, sort of. The complete architecture has changed and now also allows OpenGL ES 2.0 rendering. Not all features have been ported yet, Meshes and Texts will get a major overhaul as i want them to work for both GL 1.x and GL 2.0. This is going to be a little pain in the ass as OpenGL ES 2.0 is shader based and only god knows what your uniforms and attributes are going to be named like. Additionally the Mesh will no longer be responsible for rendering but only for storing the vertex data itself. To render you will have to instantiate another class that uses the data from the Mesh and transforms it into a vertex array or vertex buffer object depending on the available hardware.

I also included proper onPause/onResume handling even though i’m still not a big fan of reloading OpenGL resources on the fly if the surface is created anew. I’ll try to come up with a mechanism that relieves that burden from you, the developer somehow. No promises as it’s a tough nut. I wished OpenGL ES was a little like the desktop version, no resources get lost there ever.

Additionally you are not forced anymore to use landscape mode. In your Android activity you simply set the screen mode via a call to Activity.setRequestedOrientation() before initializing the AndroidApplication. However, fullscreen is still on by default, i might add a switch for that sometime if it’s needed.

You can check out the new API design in the svn repository browsable at http://code.google.com/p/libgdx/source/browse/

2 thoughts on “libgdx from scratch

  1. Thanks for all your work! I’m looking into libgdx for Android right now. You should put a paypal donate link up or something. Consider yourself bookmarked!

  2. Thanks for bookmarking me :). I will consider putting up a paypal donate button. At the moment however i’m happy with comments and suggestions only.

Leave a Reply

Your email address will not be published.