Box2DLights fixed and moved to Github

Box2DLights is a popular 3rd party library by Kalle Hamalainen that gives you an easy way to setup 2D lighting with shadows in your libgdx game. Kalle’s been maintaining it over the years, some other folks contributed patches. However, as life goes, Kalle no longer has time to maintain it.

With Kalle’s permission, I moved the project from Google Code to Github, fixed up incompatibilities with the latest nightlies, and mavenized it. You can find and contribute to Box2DLights on Github.

Attention: making Box2DLights compatible with the latest libgdx nightlies meant removing GLES 1.x compatibiilty.

Note: the libgdx team is still not going to maintain box2dlights. However, the move to Github will make it very easy for box2dlight users to help maintain it.

OpenGL ES 1.x support removed from libgdx

Since everybody was in favor of removing OpenGL ES 1.x support, i pulled the plug today. What does this mean?

  • The interfaces GL10 and GL11 are no more.
  • LwjglApplicationConfiguration and AndroidApplicationConfiguration do not have the useGL20 flags anymore.
  • LWjglApplication and AndroidApplication#initialize (and all LW and Daydream equivalents) will throw a RuntimeException if OpenGL ES 2.0 is not supported
  • Your Android app should declare it’s using GLES 2.0 in its manifest so it doesn’t turn up on the 0.00001% of devices not supporting OpenGL ES 2.0

On the desktop, the minimum desktop OpenGL version required is 2.0. Only extremely old Intel (GMA 950), SiS and Tungsten chips will not support this. These have been out for over 12 years now, so i’ll take any hatred coming my way for excluding them from running libgdx apps.

OpenGL ES 3.0 Support Added

In other news, i have added preliminary interfaces and implementations for GL30. You can play around with that on the desktop via LwjglApplicationConfiguration.useGL30. I haven’t enabled it on Android yet as i have to first understand the implications. Also, Mesh and ShaderProgram are likely going to be extended in the near future to make use of GL30 features.

Note that OpenGL ES 3.0 emulation requires OpenGL 3.2 on the desktop (or 4.1 if you want frame buffer invalidation). Also, when we create a 3.0 context on the desktop, we disable backwards compatibility. You HAVE to stick to the specs or else your stuff will fail. E.g. if you use GLSL version 330, texture2D() is no longer available, use texture() instead.

Help us test these changes!

The nightlies will be ready in a an hour from now. You can check the build progress of our Jenkins instance if you can’t await fiddling with things. Please give it a try with your existing applications. It would also be awesome if you clone the libgdx repo and test the tests and demos on your machine and report back here. I spent all of today testing on Windows, Linux, Mac OS X, Android and iOS, but the more setups the better. The removal should not influence existing code that was OpenGL version agnostic (e.g. using SpriteBatch, Scene2D etc.) in any way!