It has been nearly exactly one year since the last libGDX release, but today the time has come: libGDX 1.9.11 has been released! It contains a lot of different fixes and improvements, that were developed over the last year.
The latest version of dependencies can, as always, be found here.
A few notable changes:
- Update to MobiVM 2.3.8
- Update to LWJGL 3.2.3
- ShaderProgram
begin
andend
methods are deprecated in favour tobind
method - Replaced deprecated Android support libraries with androidx. Only
AndroidFragmentApplication
is affected. - Created interfaces for Audio and Input (see for example
AndroidAudio
andAndroidInput
) and added#createAudio
and#createInput
methods (see AndroidApplication) to allow initialising custom module implementations - Allows up to 64k (65536) vertices in a Mesh instead of 32k before. Indices can use unsigned short range, so index above 32767 should be converted to int using bitwise mask, eg.
int unsigneShortIndex = (shortIndex & 0xFFFF)
. - API Change:
glGetActiveUniform
andglGetActiveAttrib
parameter changed fromBuffer
toIntBuffer
(this may lead to compilation errors if some of your dependencies don’t use gdx 1.9.11 yet)
Full changelog
- Update to MobiVM 2.3.8
- Update to LWJGL 3.2.3
- Fixed AndroidInput crashes due to missing array resize (pressure array).
- API Change: Ray#set methods and Ray#mul(Matrix4) normalize direction vector. Use public field to set and avoid nor()
- API Change: New internal implementation of all Map and Set classes (except ArrayMap) to avoid OutOfMemoryErrors when too many keys collide. This also helps resistance against malicious users who can choose problematic names.
- API Addition: OrderedMap#alter(Object,Object) and OrderedMap#alterIndex(int,Object) allow swapping out a key in-place without changing its value; OrderedSet also has this.
- API Addition: Json can now read/write: ObjectIntMap, ObjectFloatMap, IntMap, LongMap.
- API Addition: Added @Null annotation for IDE null analysis. All parameters and return values should be considered non-null unless annotated (or javadoc'ed if not yet annotated).
- API Addition: Added ParticleEmitter#preAllocateParticles() and ParticleEffect#preAllocateParticles() to avoid particle allocations during updates.
- Fixed changing looping state of already playing sounds on Android by first pausing the sound before setting the looping state (see #5822).
- API Change: scene2d: Table#getRow now returns -1 when over the table but not over a row (used to return the last row).
- API Change: scene2d: Tree#addToTree and #removeFromTree now have an "int actorIndex" parameter.
- API Addition: scene2d: Convenience method Actions#targeting(Actor, Action) to set an action's target.
- API Change: scene2d: In TextField, only revert the text if the change event was cancelled. This allows the text to be manipulated in the change listener.
- API Change: scene2d: Tree.Node#removeAll renamed to clearChildren.
- API Addition: scene2d: Added SelectBox#setSelectedPrefWidth to make the pref width based on the selected item and SelectBoxStyle#overFontColor.
- API Change: DefaultTextureBinder WEIGHTED strategy replaced by LRU strategy.
- API Change: ShaderProgram begin and end methods are deprecated in favor to bind method.
- API Addition: Added a OpenALAudio#getSourceId(long) method.
- API Addition: Added a ShaderProgram#getHandle() method.
- API Change: Replaced deprecated Android support libraries with androidx. AndroidFragmentApplication is only affected.
- API Addition: Created interfaces AndroidAudio and AndroidInput and added AndroidApplication#createAudio and AndroidApplication#createInput to allow initializing custom module implementations.
- Allows up to 64k (65536) vertices in a Mesh instead of 32k before. Indices can use unsigned short range, so index above 32767 should be converted to int using bitwise mask, eg. int unsigneShortIndex = (shortIndex & 0xFFFF).
- API Change: DragAndDrop only removes actors that were not already in the stage. This is to better support using a source actor as the drag actor, see #5675 and #5403.
- API Change: Changed TiledMapTileLayer#tileWidth & #tileHeight from float to int
- API Addition: convenient Matrix4 rotate methods: rotateTowardDirection and rotateTowardTarget
- API Addition: Convenience method Actions#targeting(Actor, Action) to set an action's target.
- API Change: Correction of TextField#ENTER_ANDROID renamed to NEWLINE and TextField#ENTER_DESKTOP renamed to CARRIAGE_RETURN.
- API Change: Changed the visibility of TextField#BULLET, TextField#DELETE, TextField#TAB and TextField#BACKSPACE to protected.
- API Addition: TextField and TextArea are providing the protected method TextField#checkFocusTraverse(char) to handle the focus traversal.
- API Addition: UIUtils provides the constants UIUtils#isAndroid and UIUtils#isIos now.
- Fixed: The behaving of TextFields and TextAreas new line and focus traversal works like intended on all platforms now.
- API Change: Changed Base64Coder#encodeString() to use UTF-8 instead of the platform default encoding. See #6061
- Fixed: SphereShapeBuilder poles are now merged which removes lighting artifacts, see #6068 for more information.
- API Change: Matrix3#setToRotation(Vector3, float float) now rotates counter-clockwise about the axis provided. This also changes Matrix3:setToRotation(Vector3, float) and the 3d particles will rotate counter-clockwise as well.
- API Change: TexturePacker uses a dash when naming atlas page image files if the name ends with a digit or a digit + 'x'.
- API Addition: Added Skin#setScale to control the size of drawables from the skin. This enables scaling a UI and using different sized images to match, without affecting layout.
- API Change: Moved adding touch focus from Actor#notify to InputListener#handle (see #6082). Code that overrides InputListener#handle or otherwise handles InputEvent.Type.touchDown events must now call Stage#addTouchFocus to get touchDragged and touchUp events.
- API Addition: Added AsynchronousAssetLoader#unloadAsync to fix memory leaks when an asset is unloaded during loading.
- Fixed Label text wrapping when it shouldn't (#6098).
- Fixed ShapeRenderer not being able to render alpha 0xff (was max 0xfe).
- API Change: glGetActiveUniform and glGetActiveAttrib paramter changed from Buffer to IntBuffer.