IOS improvements including gles3.0


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

Engine changes:

  • 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.

SDK changes:

  • 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
  • Filters
  • PBR rendering (with pregenerated light probe)
  • Instancing
  • Shadows

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


Thanks for your contribution :+1:


Cool, thank you @joliver82 :+1:

1 Like

Let’s hope there’s some people interested in this and having the time to test the changes… I appreciate any feedback :wink:


I noticed a little bit of code formatting issue. Will appreciate it if you can fix them to be in coordination with the rest of the JME codebase. Thanks.

Thanks for taking the time to review. I’ve changed it according to the rest of the code.

Also I spent some more time on this and tested also shadows on ios which are also working properly (editing first post to reflect it)

1 Like