1. CCPlatformMacros.h 中CC_ENABLE_CACHE_TEXTURE_DATA 安卓中定义为0
2. javaactivity.cpp中nativeInit中注释一些内容
void Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeInit(JNIEnv* env,jobject thiz,jint w,jint h)
{
auto director = cocos2d::Director::getInstance();
auto glview = director->getOpenGLView();
if (!glview)
{
glview = cocos2d::GLView::create("Android app");
glview->setFrameSize(w,h);
director->setOpenGLView(glview);
cocos_android_app_init(env,thiz);
cocos2d::Application::getInstance()->run();
}
else
{
;
//cocos2d::GL::invalidateStateCache();
cocos2d::GLProgramCache::getInstance()->reloadDefaultGLPrograms();
//cocos2d::DrawPrimitives::init();
//cocos2d::VolatileTextureMgr::reloadAllTextures();
//cocos2d::EventCustom recreatedEvent(EVENT_RENDERER_RECREATED);
//director->getEventDispatcher()->dispatchEvent(&recreatedEvent);
//director->setGLDefaultValues();
}
}