示例#1
0
void keyboard(unsigned char key, int x, int y)
{
    switch(key)
    {
    case 'r':
        m_camera.Reset();
        printf("reset camera\t");
        glutPostRedisplay();
        break;
    case 's':
        //grab(600,600);does not work
        gl2ps();
        printf("snapshot");
        break;
    case 'q':
        printf("exit\n\n");
        exit(0);
        break;
    case 'k':
    case 'K':
        usekcbp = !usekcbp;
        printf("use kcbp: %d", usekcbp);
        break;
    case 'F':
    case 'f':
        finish_without_update = true;
        printf( "%f fps\n", g_fps( display, 100));
        finish_without_update = false;
        break;
    }
}
示例#2
0
void keyboard( unsigned char key, int x, int y )
{
    switch( key )
    {
        case 'F':
        case 'f':
            finish_without_update = true;
            printf( "%f fps\n", g_fps(myDisplay, 100) );
            finish_without_update = false;
            break;
    }
}