コード例 #1
0
void
Java_cc_openframeworks_OFAndroid_onSurfaceCreated( JNIEnv*  env, jclass  thiz ){
	if(appSetup){
		ofLogNotice("ofAppAndroidWindow") << "onSurfaceCreated";
		if(!surfaceDestroyed){
			ofUnloadAllFontTextures();
			ofPauseVideoGrabbers();
			ofPauseVideoPlayers();
			if(androidApp){
				androidApp->unloadTextures();
			}
		}

		ofGLReadyCallback();

		ofReloadGLResources();
		ofResumeVideoGrabbers();
		ofResumeVideoPlayers();

		if(androidApp){
			androidApp->reloadTextures();
		}
		ofSetStyle(ofGetStyle());
		surfaceDestroyed = false;
	}else{
		ofGLReadyCallback();
	}

}
コード例 #2
0
void
Java_cc_openframeworks_OFAndroid_onSurfaceDestroyed( JNIEnv*  env, jclass  thiz ){
	surfaceDestroyed = true;
	ofLog(OF_LOG_NOTICE,"onSurfaceDestroyed");
	ofUnloadAllFontTextures();
	ofPauseVideoGrabbers();
}
コード例 #3
0
void
Java_cc_openframeworks_OFAndroid_onPause( JNIEnv*  env, jobject  thiz ){
	paused = true;

	if(androidApp) androidApp->pause();
	ofUnloadAllFontTextures();
	ofPauseVideoGrabbers();
	ofxAndroidSoundStreamPause();
}
コード例 #4
0
void
Java_cc_openframeworks_OFAndroid_onSurfaceDestroyed( JNIEnv*  env, jclass  thiz ){
	surfaceDestroyed = true;
	ofLogNotice("ofAppAndroidWindow") << "onSurfaceDestroyed";
	ofUnloadAllFontTextures();
	ofPauseVideoGrabbers();
	if(androidApp){
		androidApp->unloadTextures();
	}
}
コード例 #5
0
void
Java_cc_openframeworks_OFAndroid_onSurfaceCreated( JNIEnv*  env, jclass  thiz ){
	ofLog(OF_LOG_NOTICE,"onSurfaceCreated");
	if(!surfaceDestroyed){
		ofUnloadAllFontTextures();
		ofPauseVideoGrabbers();
	}
	reloadTextures();
	if(androidApp){
		androidApp->reloadTextures();
	}
	ofSetStyle(ofGetStyle());
	ofSetOrientation(ofGetOrientation());
	surfaceDestroyed = false;

}