private void rotate_color_mask () {
    color_rotation = (color_rotation + 1) % 4;

    switch (color_rotation) {
    case 0:
      gl.color_mask (true, true, true, true);
      gl.index_mask (0xff);
      break;

    case 1:
      gl.color_mask (false, true, true, true);
      gl.index_mask (0xfe);
      break;

    case 2:
      gl.color_mask (true, false, true, true);
      gl.index_mask (0xfd);
      break;

    case 3:
      gl.color_mask (true, true, false, true);
      gl.index_mask (0xfb);
      break;
    }
  }