Reputation: 229
I paste the code in http://en.wikibooks.org/wiki/OpenGL_Programming/Android_GLUT_Wrapper#Accessing_assets in my android_main and I got error :
cannot convert 'AAssetManager*' to 'jobject {aka _jobject*}' in initialization
from line:
jobject assetManager = app->activity->assetManager;
Can anyone explained what is wrong ?
Upvotes: 0
Views: 574
Reputation: 1804
AAssetManager
is a C struct, so the the pointer is not assignable to a jobject
.
The code you copied is explaining how to get the AAssetManager
pointer, and clearly you already have it! I suspect you don't actually need this line at all, just use app->activity->assetManager
.
AAssetManager *mgr = state_param->activity->assetManager;
Upvotes: 1