コード例 #1
0
//----------------------------------------------------------------//
static void _onSpecialUp ( int key, int x, int y ) {
	( void )x;
	( void )y;

	_updateModifiers ();

	if ( key == GLUT_KEY_F1 ) {
	
		static bool toggle = true;
		
		if ( toggle ) {
			AKUReleaseGfxContext ();
		}
		else {
			AKUDetectGfxContext ();
		}
		toggle = !toggle;

	} else if ( key == GLUT_KEY_F2 ) {
	
		AKUSoftReleaseGfxResources ( 0 );

	} else {

        AKUEnqueueKeyboardEvent ( GlutInputDeviceID::DEVICE, GlutInputDeviceSensorID::KEYBOARD, key + SPECIAL_KEY_OFFSET, false );

    }
}
コード例 #2
0
//----------------------------------------------------------------//
static void _onSpecialFunc ( int key, int x, int y ) {
	( void )x;
	( void )y;
	
	if ( key == GLUT_KEY_F1 ) {
	
		static bool toggle = true;
		
		if ( toggle ) {
			AKUReleaseGfxContext ();
		}
		else {
			AKUDetectGfxContext ();
		}
		toggle = !toggle;
	}
	
	if ( key == GLUT_KEY_F2 ) {
	
		AKUSoftReleaseGfxResources ( 0 );
	}
}
コード例 #3
0
	//----------------------------------------------------------------//
	extern "C" void Java_com_ziplinegames_moai_Moai_AKUReleaseGfxContext ( JNIEnv* env, jclass obj ) {
		
		AKUReleaseGfxContext ();
	}