libGDX 1.9.8 released

libGDX 1.9.8

Mr. Tomski has graced us with another release, all on his own! Here’s what’s new.

Included in 1.9.8 are a few minor fixes, as well as some hot fixes for box2d build errors from 1.9.7.

Support for iPhoneX by default in new projects was added. For existing projects you can just add the launch images as shown in this commit https://github.com/libgdx/libgdx/commit/02dcf57e567e6fcb72cc4bf9ac981adfd20ee2ae

We’ve also updated to Bullet 2.87.

And it wouldn’t be a libGDX release without at least one breaking change! FrameBuffers ‘basic’ constructors are back, no more static methods to instantiate basic versions of FrameBuffers.
This is to make it easier for subclassing and extension. See https://github.com/libgdx/libgdx/pull/4882 for discussion.

Changelog

[1.9.8]
- Add iPhoneX images
- Fix MacOS issue with GL_ARB_texture_float extension check
- Fix AtlasTmxMapLoader tileset tile id offset
- Bullet: updated to 2.87, see: http://bulletphysics.org/wordpress/?p=485
- API Addition: Possibility to specify TexturePacker settings for resampling when scaling.
- API Addition: Support for customizing render buffer attachments in GLFrameBuffers
- API Change: Revert to constructors for GLFrameBuffers for easier customization

Happy coding,
The libGDX team

libGDX 1.9.7 released

libGDX 1.9.7

Update time. All brought to you by Tomski, marking the first time in libGDX history that someone else did the release!

Heres ya loot drops.

Important and breaking changes

GLFrameBuffer has been refactored

For creating standard FrameBuffers, FloatFrameBuffers, and FrameBufferCubemap use the new static methods in the respective classes.
For creating custom FrameBuffers, use the respective FrameBufferBuilder.

An example for building a custom FrameBuffer with multiple colour attachments and a depth attachment:

GLProfiler has been refactored

In order to support Lwjgl3, GLProfiler has been refactored to be instance based instead of static.
Create an instance of GLProfiler by passing in the Graphics interface. Feel free to make the instance you obtain static.

Changelog

[1.9.7]
- Update to MobiVM(RoboVM) 2.3.3
- Add iOS 11 support
- Update to Lwjgl 3.1.3
- Update to MOE 1.4.0
- API Change: GLFrameBuffer has been refactored https://github.com/libgdx/libgdx/pull/4882. Create standard FrameBuffers with static methods. Customized FBOS with FrameBufferBuilder
- API addition: Tiled group layer support 
- Fix Tiled properties, offset parsing for image layers
- API addition: Added utility methods for Vector equals with epsilon
- Fix Animation backing array type
- Fix Mesh copying with 0 indices 
- Fix restoration of pooled particle effects scale
- Fix loss of controller listeners on reconnect
- Added basic kotlin project generation support in the setup tool
- API addition: Allow APK expansion to be used in fragments and activities
- API addition: Added color properties support from tiled maps
- API Change: Added rotation vector sensor support on Android
- API Change: GLProfiler refactored for OOP and lwjgl3 multi windows
- LWJGL3: The creation of additional windows via Lwjgl3Application.newWindow() is now deferred, with postRunnable(), until all existing windows have been updated. This fixes a potential native crash with NVidia GL drivers on Windows, presumably caused by a GL context conflict.
- API addition: Lwjgl3WindowListener.created() is called after a new window has been created. It's unsafe to call Lwjgl3Window functions in between Lwjgl3Application.newWindow() and this callback.
- Updated LWJGL3 backend to 3.1.3.
- Lwjgl3Graphics.setUndecorated() and Lwjgl3Graphics.setResizable() now delegate their work to the respective GLFW functions.
- API addition: ProgressBar.isVertical() - returns whether a progress bar is vertical or horizontal.
- API Change: SplitPane now by default does not allow the split amount to shrink children below their minimum sizes (cropping them). This behavior can be reverted by overriding clampSplitAmount or wrapping the children in Containers set to minSize(0) and fill(). SplitPane also now correctly includes the handle min size in its own min size calculations.
- API Change: SplitPane.getSplit() renamed to SplitPane.getSplitAmount() to match other getter and setter names.
- Improved internal Timer synchronization.
- API Change: List#drawItem, added float width parameter.
- API Addition: Make it possible to disable sound on the GWT-Backend with disableSound=true.
- API Change: ScrollPane setWidget deprecated in favor of setActor to match other APIs.
- API Change: removed JGLFW backend
- Fixed mixed up use of TexturePacker.Settings.stripWhitespaceX|Y.
- Added joystick POV support to LWJGL3 controller backend.
- Added support for 2d particles sprite animation.
- API Change: ParticleEmitter getSprite, setSprite, getImagePath, setImagePath are now getSprites, setSprites, getImagePaths, setImagePaths.
- Added support for 2d particles independant scale X and Y.
- API Change: ParticleEmitter getScale, matchSize are now getScaleX/getScaleY, matchSizeX/matchSizeY. Added scaleSize(float scaleX, float scaleY)

Happy coding,
The libGDX team

libGDX 1.9.6 released

libGDX 1.9.6

Here’s what’s new (plus a ton of bug fixes, see the commit logs on GitHub).

[1.9.6]
- Fix performance regression in LWJGL3 backend, use java.nio instead of BufferUtils. Those are intrinsics and quite a bit faster than BufferUtils on HotSpot.
- Updated to latest Sound Manager 2
- Added mappings for Xbox 360 controller for Linux
- Separated error log for vertex/fragment shaders for easier debugging
- Minimum Android API level is now level 9 (Android 2.3)
- API addition: Configurable TexturePacker bleed iterations
- Updated IOS Multi-OS Engine backend to 1.3.0-beta-2
- API Change: Pixmap.setBlending, Pixmap.setFilter are now instance methods
- VertexAttribute expert constructors exposed. Short types can now be used for attributes.

Please update your projects as usual.

If you use MobiDevelop’s RoboVM fork make sure to update your Eclipse/IntelliJ IDEA/Android Studio plugin to version 2.3.0.

If you use the GWT plugin in Eclipse and don’t run your GWT project via Gradle, make sure you update your GWT plugin to version 2.8.0.

gdx-vr

In other news, I’ve been working on some VR related projects recently. Our friends from LWJGL have created wrapper for OpenVR, Valve’s SDK to talk to all kinds of VR hardware, from Oculus to the HTC Vive. I’ve built a libGDX specific wrapper on top of the OpenVR bindings, which should make working on VR projects with libGDX a little simpler.

You can find the repository include a sample application on GitHub.

There are a few caveats. OpenVR is currently really only working on Windows. OpenVR on Mac appears to be broken. Valve has released support for Linux a few weeks ago, I did not have time to test this yet. It should however just work out of the box.

Another caveat is the way rendering is performed currently. For each eye, a separate frame buffer is created. Rendering as in the example is then performed for each framebuffer, using a separate camera/projection matrix for each eye, essentially drawing the scene twice. With a 11ms/frame budget, that can be problematic if you have thousands of draw calls to render a scene for one eye, as it doubles the CPU/driver work in the VR case. Ideally, you only issue one batch of draw calls for both eyes, using instancing and a simple trick involving clipping planes in the vertex shader to redirect the rendering to either the left or right side of the combined frame buffer. Long story short: gdx-vr plus the libGDX 3D API will take you a long way, but for more complex stuff, you’ll have to get your hands dirty with custom rendering.

The frame buffers allocated per eye aren’t setup to use MSAA at the moment. The probpem with MSAA is that it’s no good for deferred rendering (not a problem with libGDX’s current 3D API, which is a basic forward renderer).

The final caveat is that the project hasn’t been released to Maven Central yet, and hardcodes dependencies on LWJGL version 3.1.2-SNAPSHOT. Once LWJGL 3.1.2 is released, I’ll also release gdx-vr to Maven Central, with its version synched to the libGDX version that uses LWJGL 3.1.2. For now, you can just import gdx-vr as a Maven project into the IDE of choice, play around with the sample or integrate it in your own project.

I have not made this an official extension yet, as the implementation currently only supports desktop system. I’ve received a Google Daydream and am looking into abstracting the gdx-vr API enough to have multiple backends, like any good extension citizen.

The minimal example looks like this:

You can find a more elaborate sample with teleportation controls here.

Happy coding,
The libGDX team