-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Prerequisite Checklist
- I searched for existing issues to prevent duplicates
- I searched for existing discussions on the forum to prevent duplicates
- I am here to report an issue and not to just ask a question or look for help (use the forum or Discord instead)
Describe your issue here
I'm trying to make SFML port for MultiCraft. Currently it works fine on Linux, however I have some issues when trying to make it working on Android.
It looks that EGL context is not created. Then it fails to compile shaders and crashes on some opengl related functions (on MultiCraft side).
From logcat:
[2025-06-02 21:44:39.554 Uid(value=10560):4698:4698 W/libEGL]
Couldn't find an OpenGL ES implementation from
[2025-06-02 21:44:39.571 Uid(value=10560):4698:4698 E/libEGL]
validate_display:559 error 3001 (EGL_NOT_INITIALIZED)
and later
[2025-06-01 00:43:15.684 Uid(value=10558):7350:7398 E/libEGL]
call to OpenGL ES API with no current context (logged once per thread)
[2025-06-01 00:43:15.684 Uid(value=10558):7350:7398 I/sfml-error]
Warning: The created OpenGL context does not fully meet the settings that were requested
[2025-06-01 00:43:15.684 Uid(value=10558):7350:7398 I/sfml-error]
Requested: version = 3.0 ; depth bits = 24 ; stencil bits = 0 ; AA level = 0 ; core = false ; debug = false ; sRGB = false
[2025-06-01 00:43:15.684 Uid(value=10558):7350:7398 I/sfml-error]
Created: version = 0.0 ; depth bits = 24 ; stencil bits = 0 ; AA level = 0 ; core = false ; debug = false ; sRGB = false
[2025-06-01 00:43:15.684 Uid(value=10558):7350:7398 I/sfml-error]
Failed to activate the window's context
You can find the SFML port here
https://github.com/deveee/Irrlicht/tree/SFML
https://github.com/deveee/MultiCraft/tree/SFML
https://github.com/deveee/deps_android/tree/SFML
The most relevant part is
https://github.com/deveee/Irrlicht/blob/SFML/source/Irrlicht/CIrrDeviceSFML.cpp
and the Android project
https://github.com/deveee/MultiCraft/tree/SFML/Android
Also note that we use custom native activity, maybe it matters
https://github.com/deveee/MultiCraft/blob/SFML/Android/app/src/main/java/com/multicraft/game/GameActivity.kt
It fails to start on several different phones, so it's not a bug in system/drivers. I tried gles1, using RenderWindow, different context creation settings, shared/static linking etc. and it seems that it is unrelated.
Any idea what can be wrong? Tbh. I'm not sure if I missed something or if it's a problem with SFML EGL context creation.
Your Environment
- OS / distro / window manager: Android
- SFML version: 3.0.1
- Compiler / toolchain:
- Special compiler / CMake flags:
Steps to reproduce
Build and run the game.
Expected behavior
Game runs.
Actual behavior
Game doesn't run.