Make tests more android friendly
See original GitHub issueHey Guys,
As I was working on the Tests in the sdk today I discovered that some tests have dependencies on jme3-desktop
, which makes them useless for Android.
A) TestFancyCar had some old SettingsDialog imports which were unusued actually. See 479392f
B) TestMipMapGen: We have two MipMapGenerator’s. One in jme3-desktop and one in jme3-core. The Desktop pendant uses AWT, which doesn’t work on Android. Technically they should do the same so the question is if there is a valid reason to still keep the one in jme3-desktop? See 10b23db
Those commits are only applied to 3.1 because I actually pushed them by mistake (my old git tool always asked for the appropriate remote, for this one you have to set it in the settings), so sorry for the inconvenience.
C) TestRenderToMemory uses jme3-desktop
’s com.jme3.util.Screenshots
.
By looking into Screenshots it seems to me that it only depends on AWT for the Buffers however we already have our own buffer implementations so we might be independent from AWT here?
Apart from that convertScreenShot2
is a horrible name for jme buffer to Image Object and the name Screenshot
itself is also a bit misleading.
I don’t know what to do there since I am unfamiliar with the classes, though.
D) TestAbsoluteLocators depends on AWTLoader
for the textures however I don’t think it’s possible to have some conditional code for Android there? Maybe we could add a TestAbsoluteLocatorsAndroid and the SDK deletes the relevant test?
E) The whole jme3test.awt
package is useless on Android. There are neither Applets nor AWT Canvases to use. The SDK will simply remove the AWT package when creating the Android Tests. Is that okay?
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (7 by maintainers)
@stephengold I think we are not on hurry on this, we can do this after v3.5.0, so i would have fixed things like
AndroidHarness
andFragmentHarness
.I agree that Android examples should go in a separate repository. That should make things less awkward for JME developers who don’t have Android Studio installed. Perhaps you should commit your Android examples to a new public GitHub repository for review. If they look good, we can fork your repo to JMonkeyEngine or jMonkeyEngine-Contributions.