Refactor some Android build things for gltfio.
We currently use static linking and will continue to do so. This means that libfilament-jni is a subset of of libgltfio-jni, and libgltfio-jni will become a subset of the upcoming libutils-jni. This is a simple layer cake, but requires adding some CMake logic to the gltfio-android CMakeLists, similar to what we already did for the filament-android CMakeLists. This prevents an obscure CMake error about duplicated build artifacts. Also, previously we required clients to call AssetLoader#init(), this is now renamed to Gltfio#init(), which is more consistent with Filament#init().
This commit is contained in:
@@ -32,18 +32,6 @@ using namespace utils;
|
||||
extern void registerCallbackUtils(JNIEnv*);
|
||||
extern void registerNioUtils(JNIEnv*);
|
||||
|
||||
jint JNI_OnLoad(JavaVM* vm, void*) {
|
||||
JNIEnv* env;
|
||||
if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
registerCallbackUtils(env);
|
||||
registerNioUtils(env);
|
||||
|
||||
return JNI_VERSION_1_6;
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT jlong JNICALL
|
||||
Java_com_google_android_filament_gltfio_AssetLoader_nCreateAssetLoader(JNIEnv*, jclass,
|
||||
jlong nativeEngine, jlong nativeProvider, jlong nativeEntities) {
|
||||
|
||||
Reference in New Issue
Block a user