Skip to content

v3.1.0 — post-fx survives an Android surface cycle

Choose a tag to compare

@apotema apotema released this 22 Sep 18:53
· 23 commits to main since this release

One fix plus one additive API. A 3.0.x pin moves here with no migration.

Fixed

Post-fx silently stopped after an Android surface cycle (labelle-gfx#364, #889). Game.surfaceLost now calls invalidateAllPostFxTargets, which tells the retained engine of the active world and every shelved world to forget its post-fx render targets without destroying them (the context is gone). They are re-created on the first restored frame, and the stacks are kept.

The call is gated on @hasDecl(GfxEngineType, "invalidatePostFxTargets"): it takes effect with labelle-gfx ≥ 2.2.0 and compiles to a no-op on older gfx.

Added

  • Game.invalidateAllPostFxTargets()

Tests

  • surfaceLost invalidates each world's targets exactly once and does not touch the stack.
  • It is a safe no-op on renderers without the seam.

Verified on an SM-T505 (bgfx/GLES) together with labelle-gfx v2.2.0 and labelle-bgfx#126.