public void hint(int which) {
    if (which == DISABLE_DEPTH_SORT) {
      flush();
    } else if (which == DISABLE_DEPTH_TEST) {
      if (zbuffer != null) {  // will be null in OpenGL and others
        Arrays.fill(zbuffer, Float.MAX_VALUE);
      }
    }
    super.hint(which);
  }