//----------------------------------------------------------------// 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 _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 ); } }