|
|
1 year ago | |
|---|---|---|
| .. | ||
| AndroidJNIIOSystem.cpp | 1 year ago | |
| BundledAssetIOSystem.cpp | 3 years ago | |
| CMakeLists.txt | 3 years ago | |
| README.md | 3 years ago | |
This module provides a facade for the io-stream-access to files behind the android-asset-management within an Android-native application.
To use this module please provide following cmake defines:
-DASSIMP_ANDROID_JNIIOSYSTEM=ON
-DCMAKE_TOOLCHAIN_FILE=$SOME_PATH/android.toolchain.cmake
"SOME_PATH" is a path to your cmake android toolchain script.
The build script for this port is based on android-cmake.
See its documentation for more Android-specific cmake options (e.g. -DANDROID_ABI for the target ABI).
Check Asset-Importer-Docs for more information.
A small example how to wrap assimp for Android:
#include <assimp/port/AndroidJNI/AndroidJNIIOSystem.h>
Assimp::Importer* importer = new Assimp::Importer();
Assimp::AndroidJNIIOSystem *ioSystem = new Assimp::AndroidJNIIOSystem(app->activity);
if ( nullptr != iosSystem ) {
importer->SetIOHandler(ioSystem);
}