godot: 3D models not rendered on iOS with compatibility renderer
Tested versions
- Reproducible: v4.3.dev1.official, v4.2.1.stable.official, v4.0.stable.official
- Working OK: v3.5.stable.official - GLES3
System information
ios16, ios17, iPhone 13 Pro Max, iPad (6th generation) - Godot 4.2.1 / Godot 4.3 - GLES3
Issue description
Some imported models with animations are not rendered on iOS devices (I didn’t test Android) with the compatibility renderer. With the mobile renderer, everything is ok. When the model is imported without a skeleton then it is rendered ok.
Godot 3.5:
Godot 4.2.1:
Log from device:
USER ERROR: AudioOutputUnitStart failed, code: -50
at: start (drivers/coreaudio/audio_driver_coreaudio.cpp:251)
Godot Engine v4.3.dev1.official.9d1cbab1c - https://godotengine.org
USER ERROR: AudioOutputUnitStart failed, code: -50
at: start (drivers/coreaudio/audio_driver_coreaudio.cpp:251)
Godot Engine v4.3.dev1.official.9d1cbab1c - https://godotengine.org
Setting up an OpenGL ES 3.0 context.
OpenGL API OpenGL ES 3.0 Metal - 99 - Compatibility - Using Device: Apple Inc. - Apple A10 GPU
OpenGL API OpenGL ES 3.0 Metal - 99 - Compatibility - Using Device: Apple Inc. - Apple A10 GPU
USER WARNING: Icon not supported by this display server.
at: set_icon (servers/display_server.cpp:582)
USER WARNING: Icon not supported by this display server.
at: set_icon (servers/display_server.cpp:582)
Errors found! Invalidating cache...
DrawView: 506 error
I found that DrawView error is from glGetError(), so it means: GL_INVALID_FRAMEBUFFER_OPERATION ( https://www.khronos.org/opengl/wiki/OpenGL_Error )
issues that could be related: #80057 #74074 #76142 #85752
Steps to reproduce
Just create the project. Download KayKit - Character Pack : Adventurers from AssetLib. Create a 3D scene, add some model (I used Mage), add 3D camera and default light + environment. Then export for iOS. I added only team and bundle id. And run on the device.
Minimal reproduction project (MRP)
About this issue
- Original URL
- State: closed
- Created 6 months ago
- Comments: 23 (13 by maintainers)
@clayjohn, i can fix crash GPU particles on ios. Here is the it: #89072 With this fix it won’t crash and 2D particles work fine 3D GPU particles need few more work. I can make it work too but i don’t think it is a good way to fix so i only mention it in the PR
Yes, that makes sense. I know on macOS transform feedback (the tool we use for particles) just isn’t supported very well. I wasn’t sure if that was the case for iOS as well, but it appears it is.
That being said, since skeletons are working with this change, we might be able to get particles working acceptably.
It works! Awsome! You are my heroes 😃
Perhaps changing the
glBindFramebuffer(GL_FRAMEBUFFER, 0)to this would work:We’ve got some issues in the compatibility renderer with not setting up the necessary state completely, and not cleaning up state completely, before/after operations. The fix in PR https://github.com/godotengine/godot/pull/83756 was clearing out some left over state that shouldn’t still be there. And it sounds like perhaps the next step isn’t completly setting up the state it needs and just assuming it’s already set to the system FBO?
Anyway, I’d be curious to know if that change works!
@brcontainer @Calinou @Jakub-Doucek After some test, issue come from commit 8d22e58063 and 10eafe236c, remove line glBindFramebuffer(GL_FRAMEBUFFER, 0); and mesh with animation work again