//----------------------------------------------------------------// 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 ); } }
//----------------------------------------------------------------// static void _onKeyDown ( unsigned char key, int x, int y ) { ( void )x; ( void )y; _updateModifiers (); AKUEnqueueKeyboardEvent ( GlutInputDeviceID::DEVICE, GlutInputDeviceSensorID::KEYBOARD, key, true ); }
//----------------------------------------------------------------// static void _onSpecialDown ( int key, int x, int y ) { ( void )x; ( void )y; _updateModifiers (); AKUEnqueueKeyboardEvent ( GlutInputDeviceID::DEVICE, GlutInputDeviceSensorID::KEYBOARD, key + SPECIAL_KEY_OFFSET, true ); }
//----------------------------------------------------------------// static void _onKeyUp ( unsigned char key, int x, int y ) { ( void )x; ( void )y; AKUEnqueueKeyboardEvent ( GlutInputDeviceID::DEVICE, GlutInputDeviceSensorID::KEYBOARD, key, false ); }