-
Notifications
You must be signed in to change notification settings - Fork 64
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
jgltf-model not portable to Android #4
Comments
Thanks for this hint. I didn't have Android on the screen for this yet, but it certainly is an interesting option, and I'd like to make the JglTF libraries available for Android if this is possible with reasonable effort and changes. Simply setting the source compatibilty to Java 1.7 in Eclipse produces the expected set of errors:
However, from the list at https://developer.android.com/guide/platform/j8-jack.html it looks like, for example, lambdas and method handles are supposed to be supported. Is there any easy way to figure out what exactly would have to be changed for Android compatibility? I'll give it a try in Android Studio, but haven't used this extensively, so don't hold your breath... |
So, I've had a look at this, and after several hours of downloads etc., it seems that at least the latest versions ("API level 24") seem to be able to understand and compile all the Java 8 language constructs, as well as the classes and interfaces from @WizzerWorks Can you confirm this? However, there are still some classes and methods that are not contained in the Android SDK. From the first bunch of error messages, these are
The latter are probably the most "difficult" to replace, as There may be different options for solving this (in fact, I have pulled an "ImageData" class out of another library also for making it Android compatible). In doubt, I might have to create two different versions of the Any ideas or general recommendations here? |
Maybe you can use JOGL AWT-free image API to load JPEG and PNG, look at com.jogamp.opengl.util.texture.TextureIO. |
A first ("pragmatic") step was to define a simple interface https://github.com/javagl/JglTF/blob/master/jgltf-viewer/src/main/java/de/javagl/jgltf/viewer/PixelData.java#L31 that represents the pixel data that may either be obtained from a |
Thanks @azmuar for the heads-up. I hoped that most parts of JglTF should now be portable to Android. I even started some basic tests a year ago, but still had been far from an actual viewer implementation. Did you encounter any further issues, or necessary changes to the Maybe we could collaborate in offering the results as a |
@azmuar By the way, JOGL works on Android. |
Hi @javagl, tnx for reply. In general I made lot of changes around the code to get JglTF working on Android and current code is in some working stage but not yet perfect, still need to fix several issues. I'm interested to collaborate and help on Currently have some major issue with Alpha Blending support, probably caused by refactored Bitmap/ImageBuffer related code but that is something I'm working on and hope I will fix that soon. @gouessej tnx also for info. I have some problems installing JOGL so I decide to go without it and try to integrate JglTF natively if possible and luckily it's possible. |
@azmuar Can you provide your branch? Its gonna be easier if somebody has already started to implement and others will help. |
@azmuar Indeed, it would be great to have an overview of the changes that have been required for Android. For example, after this issue was opened originally, I created the https://github.com/javagl/JglTF/blob/master/jgltf-viewer/src/main/java/de/javagl/jgltf/viewer/PixelData.java#L31 class as a possible abstraction layer, to get rid of the I'm asking because I'm currently working (on a branch, locally) that aims at creating glTF models programmatically (basically a I'd like to avoid "diverging" too far from the state that you created for Android - otherwise, merging the two states may be a hassle. In doubt, you can just drop your modified sources as a ZIP file somewhere, even if it is not yet final or still has issues. Then I'd try to allocate some time to sort it out, maybe create the dedicated |
@javagl Please understand me, currently code have "700" permission, I still waiting on "777" from my PM and I hope will get it soon, It's not up to me. |
@javagl Hi Marko, here is the source code for the Android APK with a ported jglTF library. |
Thanks for the pointer @mikikg ! I'm rather short on time right now, but will try to allocate some time to have a closer look at this during the coming week! |
Android support is a question that comes up occasionally. I'm not entirely up to date here, but it seems like the capabilities of Android are "overtaking" JglTF. I'll close this issue (because it's outdated). If there are more specific changes that are required for Android support, this can be tracked separately. I opened #117 to keep track of this. |
The jgltf-model implementation uses JDK 1.8 language constructs that are not portable to Android yet. It would be nice if this was a cross-platform implementation.
The text was updated successfully, but these errors were encountered: