If you are looking for past changelogs, check out this page.
Since our last release a little over a year ago, a great deal of work has been done! libGDX 1.12.0 includes some exciting new features as well as all-around improvements in various areas. Take a look below to find out more!
Audio Switch API
On the LWJGL 3 backend, we now offer an audio switch API (#6973). This has three advantages:
- The output device is automatically switched if the current one is disconnected (e.g., when headphones get unplugged). This is mainly relevant on Windows, where previously the audio just died in this case.
- The default output device is reevaluated if a new device gets connected. I.e., the application may switch to the new audio device (upon the OS’s decision).
- It is now possible to select a specific audio device. See
libGDX 1.12.0 adds a Haptics API for iOS and Android. Check out the four
Input#vibrate methods for more information.
We have recently added a new MobiVM MetalANGLE backend (#6681). This backend uses MetalANGLE (a fork of Google’s ANGLE) to translate OpenGL specific calls into Metal ones. This is an important step in making the iOS backend future proof, considering that Apple has deprecated OpenGL support on its devices. To use this backend just replace
gdx-backend-robovm in your dependencies with
OpenGL ES 3.1 & 3.2 Support for LWJGL 3
The GWT backend now supports WebGL 2 (#7037), which is the Web equivalent of OpenGL ES 3.0. This means that all of our backends now support OpenGL ES 3.0 (or at least most of its API)! To try it out, use
A few notable changes
- Touch cancel events (e.g., when the lock button is used while currently touching the screen) are now properly handled on iOS and Android. In those cases, libGDX 1.12.0 calls
InputProcessor#touchUp(see #6871); to keep the old behaviour, let your
- Updated to MobiVM 2.3.19 from 2.3.16. This adds iOS 16 bindings.
- Updated to LWJGL 3.3.2 from 3.3.1.
Other breaking changes
- On Android, immersive mode is now true by default. Set
falseto disable it.
- The return value of
AudioDevice#getLatency()is now in samples, and not milliseconds
- We had to drop support for older libc versions since libGDX is now built on Ubuntu 20.04 (see #7005)
- We increased the minimum supported iOS version to 11.0. Update your
Info.plistfile if necessary.
- 32 bit (armv7) builds are no longer supported. Builds must be 64 bit (arm64) only.
- We now use dynamic frameworks instead of static libs
IOSApplicationConfiguration#hideHomeIndicatoris now set to
IOSApplicationConfiguration#screenEdgesDeferringSystemGesturesis now set to
UIRectEdge.Allby default (was
- The preferred FPS on iOS are now uncapped
- On iOS,
ApplicationListener#createand the first
#resizeare now called within
UIApplicationDelegate#didFinishLaunching. This allows for earlier rendering and prevents black screen frames after launch screen. Please note, that your app will get terminated if this method blocks for more than 10-20 seconds!
Actor#localToAscendantCoordinatesthrows an exception if the specified actor is not an ascendant.
WidgetGroup#hitfirst validates the layout
Cellgetters return object wrappers instead of primitives.
MeshPartBuilder#lastIndexnow returns an int instead of a short
- The max bone weight is now configurable and limited to 4 by default (see #6522).
IndexData#getBufferare deprecated in favour of new methods with a boolean parameter.
Mesh#unbindhave a new parameter for instanced attribute locations. If you use these methods without instancing, you can pass a null value.
- [BREAKING CHANGE] Added #touchCancelled to InputProcessor interface, see #6871. - [BREAKING CHANGE] Android: Immersive mode is now true by default. Set `useImmersiveMode` config to `false` to disable it. - [BREAKING CHANGE] iOS: Increased min supported iOS version to 11.0. Update your Info.plist file if necessary. - [BREAKING CHANGE] iOS: `hideHomeIndicator` set to `false` by default (was `true`). - [BREAKING CHANGE] iOS: `screenEdgesDeferringSystemGestures` set to `UIRectEdge.All` by default (was `UIRectEdge.None`). - [BREAKING CHANGE] iOS: preferred FPS is now uncapped by default, see #6717 - [BREAKING CHANGE] iOS: `ApplicationListener.create` and first `resize` are now called within `UIApplicationDelegate.didFinishLaunching`. Allows for earlier rendering and prevents black screen frames after launch screen. NOTE: App will get terminated if this method is blocked for more than 10-20 sec. - [BREAKING CHANGE] Actor#localToAscendantCoordinates throws an exception if the specified actor is not an ascendant. - [BREAKING CHANGE] WidgetGroup#hit first validates the layout. - [BREAKING CHANGE] Cell getters return object wrapper instead of primitives. - [BREAKING CHANGE] MeshPartBuilder#lastIndex now returns int instead of short. - [BREAKING CHANGE] 3D API - max bone weights is now configurable and limited to 4 by default. Change this value if you need less or more. See #6522. - [BREAKING CHANGE] Mesh#getVerticesBuffer, Mesh#getIndicesBuffer, VertexData#getBuffer, and IndexData#getBuffer are deprecated in favor to new methods with boolean parameter. If you subclassed some of these classes, you need to implement the new methods. - [BREAKING CHANGE] Desktop: The return value of AudioDevice#getLatency() is now in samples, and not milliseconds - [BREAKING CHANGE] iOS: 32 bit (armv7) builds are no longer supported. Builds must be 64 bit (arm64) only. - [BREAKING CHANGE] iOS: Use dynamic frameworks instead of static libs - [BREAKING CHANGE] optimized Mesh#bind and Mesh#unbind have a new parameter for instanced attribute locations. If you use these methods without instancing, you can pass a null value. - [BREAKING CHANGE] Dropped support for older libc versions since libGDX is now built on Ubuntu 20.04 (#7005) - Update to jnigen 2.4.1 - LWJGL Fix: setPosision() for MP3 files. - iOS: Add new MobiVM MetalANGLE backend - iOS: Update to MobiVM 2.3.19 - Update to LWJGL 3.3.2 - API Addition: Added Audio#switchOutputDevice and Audio#getAvailableOutputDevices to specify output devices. Only works for LWJGL3 - Fix LWJGL3: Audio doesn't die anymore, if a device gets disconnected - API Addition: Added Haptics API with 4 different Input#vibrate() methods with complete Android and iOS implementations. - Fix: Fixed Android and iOS touch cancelled related issues, see #6871. - Javadoc: Add "-use" flag to javadoc generation - Android: gdx-setup now uses AGP 7.2.2 and SDK 32, requiring Android Studio Chipmunk or IntelliJ IDEA 2022.2 and JDK 11. - libGDX is now built using Java 11 due to new Android requirements. The rest of libGDX can still be built with JDK 8 and runtime compatibility of libGDX projects should be unaffected. - Fixed glViewport when using HdpiMode.Logical with the LWJGL3 backend. - Added Stage#actorRemoved to fire exit events just before an actor is removed. - ScrollPane#setScrollingDisabled avoids invalidate() if nothing changed. - Fixed incorrect ScrollPane#scrollTo. - API Addition: Added Texture3D support - Fix: Throw an exception when maximum Attribute count is reached to prevent silent failure. - API Fix: The cursor can now be catched on Android. - LWJGL3 Fix: Stereo audio can now be played on mono output devices. This may also improve downmixing to stereo and upmixing to surround. - API Addition: Added CheckBox#getImageDrawable. - FIX: HexagonalTiledMapRenderer now displays maps with the correct stagger index. - API Addition: Added I18NBundle#keys() method. - TOOLS Features: Save mode can be changed in Flame particle 3D editor. - API Addition: added WebGL 2.0 implementation to Gwt backend : you can enable it by GwtApplicationConfiguration#useGL30 - Added GLES31 and GLES32 support with Lwjgl3 backend implementation - API Addition: JsonReader#stop() to stop parsing. - API Change: TextureAtlas now uses FileHandle#reader so outside code can control the charset - API Fix: Intersector#isPointInTriangle - API Addition: The Skin serializer now supports useIntegerPositions - API Change: The skin serializer now treats scaledSize as a float - API Change: DataInput throws an EOF-Exception - API Fix: RenderBuffer leak in GLFrameBuffer class - API Change: Pixmap#setPixels will now verify it has been given a direct ByteBuffer - API Addition: glTexImage2D and glTexSubImage2D with offset parameter - API Addition: OrientedBoundingBox - API Addition: Tiled parallax factor support - API Fix: LWJGL 3’s borderless fullscreen works with negative monitor coords - API Fix: Update mouse x and y values immediately after calling #setCursorPosition - API Change: Never stall with AssetManager on GWT - API Change: Allow packed depth stencil buffer creation when not using GL30 - API Fix: Fixed DataInput#readString for non-ASCII - API Fix: LwjglGraphics.setupDisplay() is no longer choosing the wrong display mode - API Fix: MathUtils.lerpAngle() fixed for extreme inputs - MathUtils trigonometry improvements - Various Scene2D fixes and improvements