Skip to content

Add GameActivity support and macOS ANGLE Vulkan compatibility#136

Closed
Icehunter wants to merge 1 commit into
minecraft-linux:masterfrom
Icehunter:feature/gameactivity-macos-support
Closed

Add GameActivity support and macOS ANGLE Vulkan compatibility#136
Icehunter wants to merge 1 commit into
minecraft-linux:masterfrom
Icehunter:feature/gameactivity-macos-support

Conversation

@Icehunter

@Icehunter Icehunter commented Mar 26, 2026

Copy link
Copy Markdown

Summary

Adds support for Android GameActivity SDK (used by Minecraft 1.21+) with fake JNI class implementations, enabling Minecraft Bedrock 1.26.x to run on macOS ARM64 with GLES 3.1 via ANGLE Vulkan.

Changes

  • 8 fake JNI classes for GameActivity SDK (GameActivity, Configuration, LocaleList, WindowInsetsCompat, Insets, State, InputConnection, Locale)
  • Null-checks on GameActivity callbacks with onResume lifecycle
  • AAssetManager_fromJava returning FakeAssetManager
  • ANativeWindow stubs (setBuffersGeometry, getFormat, acquire, release)
  • Locale methods (getLanguage, getScript, getCountry, getVariant)
  • Zero-init GameActivity structs to prevent crashes
  • Removed ANGLE version gate that blocked OpenGL ES surface creation

Testing

Requires building mcpelauncher from source with this branch.

Prerequisites: cmake 4.x, a C++17 compiler, SDL3, and the usual mcpelauncher dependencies.

# Clone manifest and checkout this branch for mcpelauncher-client
git clone --recursive https://github.com/minecraft-linux/mcpelauncher-manifest.git
cd mcpelauncher-manifest
cd mcpelauncher-client && git remote add pr https://github.com/Icehunter/mcpelauncher-client.git
git fetch pr feature/gameactivity-macos-support
git checkout pr/feature/gameactivity-macos-support
cd ..

# Also apply the mcpelauncher-core fix (PR #23)
cd mcpelauncher-core && git remote add pr https://github.com/Icehunter/mcpelauncher-core.git
git fetch pr feature/gameactivity-macos-support
git checkout pr/feature/gameactivity-macos-support
cd ..

# Build
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM=4.0
make -j$(sysctl -n hw.ncpu)

To run Minecraft 1.26.10.4 with Vibrant Visuals on macOS ARM64:

  • Requires upstream google/angle built with Vulkan backend
  • Requires MoltenVK (homebrew or custom build)
  • Set environment: VK_ICD_FILENAMES, ANGLE_DEFAULT_PLATFORM=vulkan
  • Launch with -fes flag

Tested on Apple M5 Pro, macOS 26.3, Minecraft Bedrock 1.26.10.4 with Vibrant Visuals enabled.

https://youtu.be/lBNuIqISYa4

Adds support for Android GameActivity SDK (used by Minecraft 1.21+)
with fake JNI class implementations for GameActivity, Configuration,
LocaleList, WindowInsetsCompat, and related classes.

Changes:
- 8 fake JNI classes for GameActivity SDK integration
- Null-checks on GameActivity callbacks with onResume lifecycle
- AAssetManager_fromJava returning FakeAssetManager
- ANativeWindow stubs (setBuffersGeometry, getFormat, acquire, release)
- Locale methods (getLanguage, getScript, getCountry, getVariant)
- Zero-init GameActivity structs to prevent crashes
- Force OpenGL ES surface flag (-fes) version gate removal for ANGLE
@Icehunter

Copy link
Copy Markdown
Author

This is also related to:

google/angle#103
KhronosGroup/MoltenVK#2702

Locally when I run everything after a build a get a substantial improvement in vibrant visuals, but i'm still fighting over some artifacts on/in water, and some leaf shading during the day.

@ChristopherHX

ChristopherHX commented Mar 26, 2026

Copy link
Copy Markdown
Member

I am a bit confused, since for me

  • gameactivity support is already sufficient
  • moltenvk also works (gated by mc version, because of breaking older devices)
  • your video also have the very similar mvk glitches than me without all the additional changes
    • I switched to Fancy and recommend that to everyone

kosmickrisp might do better than mvk. Did the switch in a few days to not need to compile anything additionally

@Icehunter Icehunter closed this Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants