android fopen权限,android ndk native code fopen() path
I am new to programming and trying to learn android with native c++ code.I am trying to open a bitmap file in native code so I can load it as a texture in opengl.FILE* img = NULL;img = fopen("banana.b
I am new to programming and trying to learn android with native c++ code.
I am trying to open a bitmap file in native code so I can load it as a texture in opengl.
FILE* img = NULL;
img = fopen("banana.bmp","rb");
if (img == NULL)
{
__android_log_print(ANDROID_LOG_DEBUG, DEBUG_TAG, "NDK:LC: [%s]", "load texture file = null");
return -1;
}
the above code always return img as null.
Where should I put my banana.bmp file?
Right now I put it in the jni folder along with the android.mk and c++ source files.
Can someone please explain to me? Thanks
更多推荐
所有评论(0)