protected void handle_keyboard (int key, int state, int x, int y) {
    switch (key) {
    case 'e':                   // fall through
    case 'E': 
      gl.tex_geni (GL.S, GL.TEXTURE_GEN_MODE, GL.EYE_LINEAR);
      texture_plane = GL.EYE_PLANE;
      break;

    case 'o':                   // fall through
    case 'O':
      gl.tex_geni (GL.S, GL.TEXTURE_GEN_MODE, GL.OBJECT_LINEAR);
      texture_plane = GL.OBJECT_PLANE;
      break;

    case 's':                   // fall through
    case 'S': texture_coeff = TEXTURE_SLANTED; break;
    case 'x':                   // fall through
    case 'X': texture_coeff = TEXTURE_YZ; break;
    default: return;
    }

    gl.tex_genfv (GL.S, texture_plane, texture_coeff);
    mark_window_dirty ();
  }