-
Notifications
You must be signed in to change notification settings - Fork 103
Ios gl3 and some improvements #295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Implemented native methods
…being the included sdk
…d aspect ratio and being able to use the whole screen and the proper resolution
| (GLenum) mode, | ||
| (GLsizei) count, | ||
| (GLenum) type, | ||
| (const void *) indices, // TODO: lwjgl uses intptr_t insead, double check it works properly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this TODO solved?
jlong should be capable of 64bit, an intptr may only be 32bit on, well, 32bit systems.
On the other hand iirc, most recent iOS enforces 64bit only? Could have also been on macOS only, not sure about that.
Either way it depends on how the buffer is allocated, in theory it should be impossible, unless by manual interception, to get a > 32bit pointer from some buffer allocator on a 32bit system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a comment for myself not to forget to test it properly because lwjgl was casting indices to intprt_t instead of const void * like it's defined in https://www.khronos.org/registry/OpenGL-Refpages/es3.0/html/glDrawElementsInstanced.xhtml and https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glDrawElementsInstanced.xhtml
Anyway, I tested instancing and it's working as expected, so I'm removing the useless comment ;)
|
Thanks for you contribution and sorry for the delay. I'd like to make a "statement" about iOS support here, even if it's unrelated to the PR itself: Bottom line: This is still using a java 7 jvm, so building with java 8 may fail. Also avian got deprecated in the meantime. So ultimatively we probably want/need a new way of deploying for iOS, but there wasn't much demand/activity on the iOS side though. On topic:
Besides that, the PR looks good (note the TODO though), however I couldn't really test if it works/compiles, which in the current state of not having any CI/CD for it anyway, is probably as good as it gets. |
|
Thanks @MeFisto94 for taking the time to review the PR About the ios-data.zip, if it's not zipped automatically when the SDK is built, I don't mind creating a new PR to update it later if required Yes, I changed the appResize because sometimes the renderer was null still, causing a weird rendering issue in ios13.0 but not in any other release I've tested and I wanted to be coherent among ios releases. You have an screenshot at this hub post: https://hub.jmonkeyengine.org/t/ios-multiple-issues-and-solutions-workarounds-trying-to-run-jme3-app/44304/25 All my tests were done using newest SDK (3.3.2-prev1) using my OS jdk8 and also the included jdk11 adding the --release option (Compile for a specific VM version. Supported targets: 6, 7, 8, 9, 10, 11) both worked. So still possible to compile for legacy java versions About testing, it would be great if someone had the time to manually test the changes Getting into the offtopics... About avian, for the short term, we will need to move it from bintray to other site or even to the SDK repo itself. In the long term avian should be replaced by any other newer and supported jvm like graalvm or even minijvm. This will be a hard topic to address The code could be moved to the engine itself but SDK will need to be modified to extract/copy the required template code files and most of this code being ios specific code won't get through CI/CD because it needs an OSX to compile. Maybe a task to be talked about in the future... |
|
Going to merge this in 24H if there is no objection. |
|
I don't know if we should wait for someone to confirm it works, which however may never happen. |
|
Ok, just noticed @joliver82 has already asked GTWhite for a feedback in forum. So let's wait a little more in case he wants to give this a try. |
|
I agree if anyone tests this would be great (apart from me) but it seems that there isn't many people working with jme3 on iOS. I hope GTWhite has some spare time for this. |
|
I am merging this as there was no response from GTWhite. |
|
Thanks for merging! GTWhite just answered on the forum. If any related issue is found we'll track it and create new PRs for them |
|
I see. Thanks so much for your contribution ❤️ Edit: Off topic
Just in case, another alternative I just found recently is the RoboVM fork maintained by LibGDX guys here: https://github.com/MobiVM/robovm |
List of changes:
I'm just missing one detail, if I do need to replace also ./src/com/jme3/gde/ios/ios-data.zip or is it regenerated on SDK build?
Topic at hub: https://hub.jmonkeyengine.org/t/ios-improvements-including-gles3-0/44332
** This PR needs the related engine PR: jMonkeyEngine/jmonkeyengine#1473