Skip to content

Commit

Permalink
Add the 1.13.0 announcement
Browse files Browse the repository at this point in the history
  • Loading branch information
crykn committed Oct 17, 2024
1 parent 9a7a65d commit fc3ead0
Show file tree
Hide file tree
Showing 6 changed files with 147 additions and 59 deletions.
15 changes: 1 addition & 14 deletions _pages/dev/versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,5 @@ sidebar:
# libGDX {{ site.data.versions.libgdxRelease }}
Keep up to date with the latest versions of dependencies and dev tools! Instructions on how to update your Gradle files can be found [here](/wiki/articles/updating-libgdx).

### RoboVM
- RoboVM Version: {{ site.data.versions.robovmVersion }}
- RoboVM Gradle Plugin Version: {{ site.data.versions.robovmPluginVersion }}

### Android
- Android Build Tools Version: {{ site.data.versions.androidBuildtoolsVersion }}
- Android SDK Version: {{ site.data.versions.androidSDKVersion }}
- Android Gradle Tool Version: {{ site.data.versions.androidGradleToolVersion }}

### GWT
- GWT Version: {{ site.data.versions.gwtVersion }}
- GWT Gradle Plugin Version: {{ site.data.versions.gwtPluginVersion }}

### Extensions
Our extensions use their own versioning schemes. You cand find their latest versions on the respective release pages: [Ashley](https://github.com/libgdx/ashley/releases), [Box2DLights](https://github.com/libgdx/box2dlights/releases), [gdx-ai](https://github.com/libgdx/gdx-ai/releases), [gdx-controllers](https://github.com/libgdx/gdx-controllers/releases), [gdx-pay](https://github.com/libgdx/gdx-pay/releases)
Our extensions use their own versioning schemes. You can find their latest versions on the respective release pages: [Ashley](https://github.com/libgdx/ashley/releases), [Box2DLights](https://github.com/libgdx/box2dlights/releases), [gdx-ai](https://github.com/libgdx/gdx-ai/releases), [gdx-controllers](https://github.com/libgdx/gdx-controllers/releases), [gdx-pay](https://github.com/libgdx/gdx-pay/releases)
39 changes: 2 additions & 37 deletions _plugins/libgdx_fetch_versions.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
# This plugin automatically fetches the latest version of libGDX's dependencies
# by parsing the DependencyBank file of the latest released version of gdx-setup
#
# https://github.com/libgdx/libgdx/blob/master/extensions/gdx-setup/src/com/badlogic/gdx/setup/DependencyBank.java
#
# This is basically a Ruby port of https://github.com/libgdx/libgdx-site/blob/master/src/main/java/com/badlogicgames/libgdx/site/GameService.java
# and https://github.com/libgdx/libgdx-site/blob/master/src/main/java/com/badlogicgames/libgdx/site/Versions.java
# This plugin automatically fetches the name of the latest version of libGDX

require "jekyll"
require 'json'
Expand All @@ -17,37 +11,8 @@ class VersionDataGenerator < Jekyll::Generator

def generate(site)
latestReleaseApiResponse = JSON.load(URI.open('https://api.github.com/repos/libgdx/libgdx/releases/latest'))
dependencyBankContent = URI.open("https://raw.githubusercontent.com/libgdx/libgdx/" + latestReleaseApiResponse['tag_name'] + "/extensions/gdx-setup/src/com/badlogic/gdx/setup/DependencyBank.java", &:read)

site.data['versions'] = Hash.new

site.data['versions']['libgdxRelease'] = getVersion(dependencyBankContent, 'libgdxVersion')
site.data['versions']['libgdxNightlyVersion'] = getVersion(dependencyBankContent, 'libgdxNightlyVersion')
site.data['versions']['robovmVersion'] = getVersion(dependencyBankContent, 'roboVMVersion')
site.data['versions']['robovmPluginVersion'] = getVersion(dependencyBankContent, 'roboVMVersion')
site.data['versions']['androidBuildtoolsVersion'] = getVersion(dependencyBankContent, 'buildToolsVersion')
site.data['versions']['androidSDKVersion'] = getVersion(dependencyBankContent, 'androidAPILevel')
site.data['versions']['androidGradleToolVersion'] = getPluginVersion(dependencyBankContent, 'androidPluginImport')
site.data['versions']['gwtVersion'] = getVersion(dependencyBankContent, 'gwtVersion')
site.data['versions']['gwtPluginVersion'] = getPluginVersion(dependencyBankContent, 'gwtPluginImport')
end

def getVersion(str, match)
result = str.match(match + '\s=\s"(.*?)"')
result.nil? ? "Unknown" : result[1]
end

def getPluginVersion(str, match)
result = str.match(match + '\s=\s"(.*?)"')

if result.nil?
ret = "Unknown"
else
ret = result[1]
ret = ret[ret.rindex(':') + 1, ret.length]
end

ret
site.data['versions']['libgdxRelease'] = latestReleaseApiResponse['name']
end

end
Expand Down
17 changes: 13 additions & 4 deletions _posts/2021/2021-07-24-devlog-7-lwjgl3.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,26 @@ To switch your existing libGDX projects to the LWJGL 3 desktop backend you need
### Do I need to do anything else?
If you are on Windows or Linux, you are all set!

However, if you are on **macOS**, there is another step involved in getting your applications to run with the LWJGL 3 backend. Since libGDX 1.11.0, you can either add the ([experimental](https://github.com/libgdx/libgdx/issues?q=is%3Aissue+is%3Aopen+label%3Aglfw-awt-macos)) gdx-lwjgl3-glfw-awt-macos dependency to your desktop project (`api "com.badlogicgames.gdx:gdx-lwjgl3-glfw-awt-macos:$gdxVersion"`; on Windows and Linux the extension is ignored) or you can run the JVM with the [`-XstartOnFirstThread`](https://github.com/LWJGL/lwjgl3/blob/572f69802cb2d4930777403c73999c3e01de9d56/modules/lwjgl/glfw/src/main/java/org/lwjgl/glfw/EventLoop.java#L14-L23) argument on macOS. This ensures that your application’s `main()` method runs on the first (i.e., the AppKit) thread and will be familiar to those of you with experiences with SWT.
However, if you are on **macOS**, there is another step involved in getting your applications to run with the LWJGL 3 backend.

Typically, the argument can be set in the Launch/Run Configurations of your IDE, as is described [here](/wiki/start/import-and-running). Alternatively, if you're starting your project via Gradle, add this line to the `run` task of the desktop Gradle file:
You can either run the JVM with the [`-XstartOnFirstThread`](https://github.com/LWJGL/lwjgl3/blob/572f69802cb2d4930777403c73999c3e01de9d56/modules/lwjgl/glfw/src/main/java/org/lwjgl/glfw/EventLoop.java#L14-L23) argument on macOS. This ensures that your application’s `main()` method runs on the first (i.e., the AppKit) thread and will be familiar to those of you with experiences with SWT. Typically, the argument can be set in the Launch/Run Configurations of your IDE, as is described [here](/wiki/start/import-and-running). If you intend on deploying your game by packaging a JRE with it (which is the recommended way to distribute your game!), jpackage or packr allow you to set the JVM arguments. If you're starting your project via Gradle, add this line to the `run` task of the desktop Gradle file:
```
jvmArgs = ['-XstartOnFirstThread']
```
Another viable approach for _outside of your development environment_ is to just programatically restart the JVM if the argument is not present (see [here](https://github.com/crykn/guacamole/blob/master/gdx-desktop/src/main/java/de/damios/guacamole/gdx/StartOnFirstThreadHelper.java#L69) for a simple example). Alternatively, if you want to deploy your game by packaging a JRE with it (which is the recommended way to distribute your game), jpackage or packr allow you to set the JVM arguments.

Alternatively, you can use a custom experimental implementation of the GLFW library by adding this code snippet to the start of your `main()` method:

```java
if (SharedLibraryLoader.isMac) {
Configuration.GLFW_LIBRARY_NAME.set("glfw_async");
}
```

A third option, especially viable for _outside of your development environment_, is to just programatically restart the JVM if the argument is not present (see [here](https://github.com/crykn/guacamole/blob/master/gdx-desktop/src/main/java/de/damios/guacamole/gdx/StartOnFirstThreadHelper.java#L69) for a simple example).

### Are there any other things I need to be aware of?
- Whenever your **application is minimised**, the LWJGL 3 backend calls `ApplicationListener#resize(0, 0)`. This can lead to unexpected issues, in particular if you are (re)building framebuffers whenever the application is resized.
- To use **Swing or AWT** APIs, you'll have to depend on the ([experimental](https://github.com/libgdx/libgdx/issues?q=is%3Aissue+is%3Aopen+label%3Aglfw-awt-macos)) gdx-lwjgl3-glfw-awt-macos extension. See [`AwtTestLWJGL`](https://github.com/libgdx/libgdx/blob/master/tests/gdx-tests-lwjgl3/src/com/badlogic/gdx/tests/lwjgl3/AwtTestLWJGL.java) in gdx-tests-lwjgl3 for an example.
- To use **Swing or AWT** APIs, you'll have to try out the experimental alternative GLFW library. See [`AwtTestLWJGL`](https://github.com/libgdx/libgdx/blob/master/tests/gdx-tests-lwjgl3/src/com/badlogic/gdx/tests/lwjgl3/AwtTestLWJGL.java) in gdx-tests-lwjgl3 for an example.
- The LWJGL 3 backend does [not yet](https://github.com/libgdx/libgdx/pull/6247) have an equivalent for `LwjglAWTCanvas` and `LwjglAWTFrame`.
- As the graphical tools in **gdx-tools** require the `LwjglAWTCanvas` class, the library has a hard dependency on LWJGL 2. If you are using one of the non-graphical tools of the gdx-tools project (in particular [TexturePacker](/wiki/tools/texture-packer#from-source)) and the LWJGL 3 backend _in the same (!) project_, you need to modify your gdx-tools dependency like this:
```gradle
Expand Down
115 changes: 115 additions & 0 deletions _posts/2024/2024-10-17-gdx-1-13.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
---
title: "libGDX 1.13.0"
classes: wide2
header:
overlay_color: "#000"
overlay_filter: "0.5"
overlay_image: /assets/images/update.jpeg
caption: "Photo credit: [**Markus Winkler**](https://unsplash.com/photos/cxoR55-bels)"
teaser: /assets/images/update.jpeg
excerpt: "We are proud to present a new release of libGDX: version 1.13.0!"

show_author: true
author_username: "crykn"
author_displayname: "damios"

tags:
- changelog

categories: news
---
If you are looking for past changelogs, check out [this](/news/changelog/) page.
{: .notice--primary .no-top-margin }

It has been some time since our last release, but version 1.13.0 of libGDX brings plenty of improvements and bug fixes. Check out the full list below to find out more.

## Breaking changes

The following changes require you to adapt your existing libGDX codebases:

- [ANDROID] The minimum API level is now `19` (Android 4.4).
- [ANDROID] Removed `Input#setCatchBackKey`, `#isCatchBackKey`, `#setCatchMenuKey`, and `#isCatchMenuKey` deprecated in 1.9.10. Use `#setCatchKey` and `#isCatchKey` instead.
- [ANDROID & iOS] Exceptions occurring in `Runnable` tasks scheduled through `Gdx.app.postRunnable(...)` are no longer swallowed and will crash the app. Add a protection to your tasks if required.
- [GWT] Updated to [GWT 2.11.0](https://www.gwtproject.org/release-notes.html#Release_Notes_2_11_0) from 2.10.0. This improves the JRE emulation to support features from Java 11 like collections, streams, and more. To keep old projects working, add `com.google.jsinterop:jsinterop-annotations:2.0.2:sources` as dependency to your html subproject.
- [iOS] The minimum supported iOS version is now 12.0. Update your `Info.plist` file if necessary.
- [LWJGL3] The `gdx-lwjgl3-glfw-awt-macos` extension was retired. Just remove it from your dependencies and use the following snippet at the start of your `main()` method instead ([#7361](https://github.com/libgdx/libgdx/pull/7361)):
```java
if (SharedLibraryLoader.isMac) {
Configuration.GLFW_LIBRARY_NAME.set("glfw_async");
}
```

## A few notable changes
In addition, there are a couple notable changes:

- [CORE] There have been a couple of minor performance improvements, in particular to `Sprite` and `SpriteBatch`.
- [CORE] Added Framebuffer multisample support ([#7185](https://github.com/libgdx/libgdx/pull/7185)). Take a look at [`GL31FrameBufferMultisampleTest`](https://github.com/libgdx/libgdx/blob/master/tests/gdx-tests/src/com/badlogic/gdx/tests/gles31/GL31FrameBufferMultisampleTest.java) for a simple example of how to use it.
- [CORE] There is a new API to get user input via native text fields ([#7004](https://github.com/libgdx/libgdx/pull/7004)).
- [GWT] The audio device can be switched now ([#7243](https://github.com/libgdx/libgdx/pull/7243)). This has to be enabled via `GwtApplicationConfiguration#fetchAvailableOutputDevices` beforehand.
- [iOS] Updated to [MobiVM 2.3.21](https://github.com/MobiVM/robovm/wiki/Changelog#2321-february-2024) from 2.3.21.
- [iOS] The iOS backend now has an implementaion for `AudioDevice` ([#7371](https://github.com/libgdx/libgdx/pull/7371)). It can be configured through `IOSApplicationConfiguration` with `audioDeviceBufferSize` and `audioDeviceBufferCount`.
- [LWJGL3] Added the `Lwjgl3ApplicationConfiguration#pauseWhenMinimized` and `#pauseWhenLostFocus` flags to control when the application should call the `pause()` method on the `ApplicationListener` ([#7287](https://github.com/libgdx/libgdx/pull/7287)).
- [LWJGL3] Support for Linux RISC-V has been added ([#7275](https://github.com/libgdx/libgdx/pull/7275)).

To check out our progress towards the next release, take a look at the [corresponding milestone](https://github.com/libgdx/libgdx/milestone/7) on GitHub. As always, we appreciate feedback on the issues/PRs already part of the milestone and would like to invite you to bring forward anything still missing on our [Discord](/community/discord/) server!

### Full changelog
Updating your Gradle project is straight-forward: Check out the instructions [on the wiki](/wiki/articles/updating-libgdx)!
{: .notice--info}
```
3.0]
- [BREAKING CHANGE] GWT: Updated to 2.11.0. `com.google.jsinterop:jsinterop-annotations:2.0.2:sources` must be added as a dependency to your html project dependencies.
- [BREAKING CHANGE] Android: Minimum API level is now level 19 (Android 4.4)
- [BREAKING CHANGE] iOS: Increased min supported iOS version to 12.0. Update your Info.plist file if necessary.
- [BREAKING CHANGE] Android, iOS: Exceptions occurring in Runnable tasks scheduled through Gdx.app.postRunnable() are no longer swallowed and will crash the app (add a protection if required).
- Updated: Update to jnigen 2.5.2
- iOS: Update to MobiVM 2.3.21
- iOS: The iOS backend now implements AudioDevice. It can be configured through IOSApplicationConfiguration with audioDeviceBufferSize/audioDeviceBufferCount
- Fixed GlyphLayout for fixed width glyph offsets at the start and end of lines.
- Fixed scene2d.ui layout for fractional positions and sizes.
- LWJGL3: Added pauseWhenMinimized and pauseWhenLostFocus flags to Lwjgl3ApplicationConfiguration.
- libGDX is now built using Java 17 due to Gradle 8 requirements.
- New GDX Setup projects now use Gradle 8.4 and AGP Plugin 8.1.2 which require at least Java 17.
- Fixed Timer#stop, remember time spent stopped and delay tasks when started again. #7281
- Android: Add configuration option to render under the cutout if available on the device.
- Fix: Keep SelectBox popup from extending past right edge of stage.
- Added Framebuffer multisample support (see GL31FrameBufferMultisampleTest.java for basic usage)
- Fix: Fonts generated with gdx-freetype no longer bleed when drawn with a shadow
- Fixed Timer tasks being run after cancellation.
- Optimization of SpriteBatch in GL30 default modes, as indices do not need to be updated
- Desktop: Added support for 8/32/64-bit PCM and MP3 WAVs
- Desktop: Improved support for surround sound audio files (#6792)
- Android: Added support for predictive back gesture (requires android:enableOnBackInvokedCallback="true" in manifest)
- API Removal: Removed deprecated back and menu key methods. Use `setCatchKey` and `isCatchKey` instead.
- Cache packed color on sprite to improve performance
- Improve JsonReader, add JsonSkimmer, JsonString
- Add proper glTexImage2D support on GWT
- Expose the color variables of Box2DDebugRenderer
- Add Color#set(Color rgb, float a)
- Prevent loss of precision in OrthographicCamera#update
- Fix offsets in ConvexHull while being unsorted
- Small particle emitter improvements
- Fix : RenderBuffer leak in GLFrameBuffer
- LWJGL 3: Remove unnecessary window.makeCurrent() calls to improve performance (#7362)
- Fix: DragListener only listens to the correct touch up events
- Fix incorrect glyph page index in FreeTypeFontGenerator
- Added TextureAtlas.TextureAtlasData.Page#name.
- iOS: Improve preferred FPS setting logic and documentation on iOS backend
- Fixed TextField breaking if the font has markup enabled.
- Only allow scrolling of a scroll pane if it has scroll focus
- iOS: Adding RoboVM AudioDevice implementation
- Add new Color#CLEAR_WHITE
- Fixed ScrollPane#scrollTo setting scrollX when there's a width
- Screens now extend the Disposable interface
- Added antialiasing flag to the ScreenUtils.
- Fix Intersector.intersectPolygons() corner case
- LWJGL 3: Fix the delta time not changing when resizing the window
- GWT: Allow switching the audio device; this has to be enabled via GwtApplicationConfiguration#fetchAvailableOutputDevices
- Add API to get user inout with native text fields (#7004)
- Fix issue with the 'request still pending' check on NetJavaImpl
- Added possibility to reset a particle effect without starting it
- Android & iOS: Use empty Audio implementations on Android and iOS when audio is disabled
- Adds status detection for an httpRequest
- Fix ANGLE GLES renderer on dekstop (#7274)
- Architecture support: Support for Linux RISC-V has been added. The gdx-xxx-natives-desktop.jar files now also contain native libraries for this architecture.
```
2 changes: 1 addition & 1 deletion wiki/articles/updating-libgdx.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Your Gradle based project makes it very easy to switch between releases and nigh
gdxVersion=1.12.1
```

The version you see may be higher than `1.12.1`. Once you've located that string, you can simply change it to the latest release (or an older release) or to the current SNAPSHOT version. You may also have to update other versions and dependencies based on the [versions listing](/dev/versions/). Once edited, save the `gradle.properties` file.
The version you see may be higher than `1.12.1`. Once you've located that string, you can simply change it to the latest release (or an older release) or to the current SNAPSHOT version. You may also have to update other versions and dependencies based on the changelog of libGDX. Once edited, save the `gradle.properties` file.

The next step is dependent on your IDE:

Expand Down
Loading

0 comments on commit fc3ead0

Please sign in to comment.