I’ve spending some time trying to get my current app working on ios and as it requires some functionalities not supported in ios still I decided to implement/fix them myself.
I modified both jme3 and the sdk
- Forced compilation using java 8 (options.release parameter) to avoid random NoSuchMethodException for some methods of java.nio.*Buffer classes.
- Modified GLRenderer to get default framebuffer on start. Most gl implementations use 0 but iOS use a random buffer depending on the execution (usually 1). This allows the usage of filters and postprocessors using an additional framebuffer on ios. Previously if you enabled any of those the screen went black.
- Implemented missing methods of gles2.
- Implemented gles3 methods.
- Fixed proguard rules.
- Added openGLES3 initialization.
- Implemented native code of missing methods of gles2.
- Implemented native code of gles3 methods.
- Forced compilation using java 8.
- Added Dummy.storyboard to be used as “Launch Screen File” in xcode to avoid bad aspect ratio and being able to use the whole screen and the proper resolution.
- Updated iPhone target to 9.0.
I’ve tested so far (using simulator or a physical iPhone 5s, the only iPhone I could get):
- Some default jme3 examples that were previously working
- PBR rendering (with pregenerated light probe)
Here’s the thread I’ve been posting also some issues I found in the way, just in case anyone is interested in some minor details: [iOS] Multiple issues (and solutions/workarounds) trying to run jme3 app
I know openGL is deprecated in all apple platforms but while it’s not fully removed (I hope it won’t be in the short term) and we don’t have a better option… it’s better to have an improved support for it
Engine: iOS gl3 and some improvements by joliver82 · Pull Request #1473 · jMonkeyEngine/jmonkeyengine · GitHub
SDK: Ios gl3 and some improvements by joliver82 · Pull Request #295 · jMonkeyEngine/sdk · GitHub
EDIT: I forgot to mention both PR’s must be merged together, otherwise weird behavior could happen