コード例 #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 _onKeyDown ( unsigned char key, int x, int y ) {
	( void )x;
	( void )y;

	_updateModifiers ();
	
	AKUEnqueueKeyboardEvent ( GlutInputDeviceID::DEVICE, GlutInputDeviceSensorID::KEYBOARD, key, true );
}
コード例 #3
0
//----------------------------------------------------------------//
static void _onSpecialDown ( int key, int x, int y ) {
	( void )x;
	( void )y;

	_updateModifiers ();

	AKUEnqueueKeyboardEvent ( GlutInputDeviceID::DEVICE, GlutInputDeviceSensorID::KEYBOARD, key + SPECIAL_KEY_OFFSET, true );
}
コード例 #4
0
//----------------------------------------------------------------//
static void _onKeyUp ( unsigned char key, int x, int y ) {
	( void )x;
	( void )y;
	
	AKUEnqueueKeyboardEvent ( GlutInputDeviceID::DEVICE, GlutInputDeviceSensorID::KEYBOARD, key, false );
}