From Jordi Torres, "We must use JNI_FALSE instead of false in JNI code. Otherwise the examples will not compile. This patch should be applied to osgAndroidExampleGLES1/jni and osgAndroidExampleGLES2/jni. the osgNativeLib.cpp is the same. "
This commit is contained in:
parent
88bbcaecd2
commit
2923c8014a
@ -75,7 +75,7 @@ JNIEXPORT void JNICALL Java_osg_AndroidExample_osgNativeLib_setClearColor(JNIEnv
|
|||||||
}
|
}
|
||||||
JNIEXPORT void JNICALL Java_osg_AndroidExample_osgNativeLib_loadObject(JNIEnv * env, jobject obj, jstring address){
|
JNIEXPORT void JNICALL Java_osg_AndroidExample_osgNativeLib_loadObject(JNIEnv * env, jobject obj, jstring address){
|
||||||
//Import Strings from JNI
|
//Import Strings from JNI
|
||||||
const char *nativeAddress = env->GetStringUTFChars(address, false);
|
const char *nativeAddress = env->GetStringUTFChars(address, JNI_FALSE);
|
||||||
|
|
||||||
mainApp.loadObject(std::string(nativeAddress));
|
mainApp.loadObject(std::string(nativeAddress));
|
||||||
|
|
||||||
@ -84,8 +84,8 @@ JNIEXPORT void JNICALL Java_osg_AndroidExample_osgNativeLib_loadObject(JNIEnv *
|
|||||||
}
|
}
|
||||||
JNIEXPORT void JNICALL Java_osg_AndroidExample_osgNativeLib_loadObject(JNIEnv * env, jobject obj, jstring address, jstring name){
|
JNIEXPORT void JNICALL Java_osg_AndroidExample_osgNativeLib_loadObject(JNIEnv * env, jobject obj, jstring address, jstring name){
|
||||||
//Import Strings from JNI
|
//Import Strings from JNI
|
||||||
const char *nativeAddress = env->GetStringUTFChars(address, false);
|
const char *nativeAddress = env->GetStringUTFChars(address,JNI_FALSE);
|
||||||
const char *nativeName = env->GetStringUTFChars(name, false);
|
const char *nativeName = env->GetStringUTFChars(name, JNI_FALSE);
|
||||||
|
|
||||||
mainApp.loadObject(std::string(nativeName),std::string(nativeAddress));
|
mainApp.loadObject(std::string(nativeName),std::string(nativeAddress));
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ JNIEXPORT void JNICALL Java_osg_AndroidExample_osgNativeLib_setClearColor(JNIEnv
|
|||||||
}
|
}
|
||||||
JNIEXPORT void JNICALL Java_osg_AndroidExample_osgNativeLib_loadObject(JNIEnv * env, jobject obj, jstring address){
|
JNIEXPORT void JNICALL Java_osg_AndroidExample_osgNativeLib_loadObject(JNIEnv * env, jobject obj, jstring address){
|
||||||
//Import Strings from JNI
|
//Import Strings from JNI
|
||||||
const char *nativeAddress = env->GetStringUTFChars(address, false);
|
const char *nativeAddress = env->GetStringUTFChars(address, JNI_FALSE);
|
||||||
|
|
||||||
mainApp.loadObject(std::string(nativeAddress));
|
mainApp.loadObject(std::string(nativeAddress));
|
||||||
|
|
||||||
@ -84,8 +84,8 @@ JNIEXPORT void JNICALL Java_osg_AndroidExample_osgNativeLib_loadObject(JNIEnv *
|
|||||||
}
|
}
|
||||||
JNIEXPORT void JNICALL Java_osg_AndroidExample_osgNativeLib_loadObject(JNIEnv * env, jobject obj, jstring address, jstring name){
|
JNIEXPORT void JNICALL Java_osg_AndroidExample_osgNativeLib_loadObject(JNIEnv * env, jobject obj, jstring address, jstring name){
|
||||||
//Import Strings from JNI
|
//Import Strings from JNI
|
||||||
const char *nativeAddress = env->GetStringUTFChars(address, false);
|
const char *nativeAddress = env->GetStringUTFChars(address,JNI_FALSE);
|
||||||
const char *nativeName = env->GetStringUTFChars(name, false);
|
const char *nativeName = env->GetStringUTFChars(name, JNI_FALSE);
|
||||||
|
|
||||||
mainApp.loadObject(std::string(nativeName),std::string(nativeAddress));
|
mainApp.loadObject(std::string(nativeName),std::string(nativeAddress));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user