public void flush() {
    if (hints[ENABLE_DEPTH_SORT]) {
      sort();
    }
    render();

    /*
    if (triangleCount > 0) {
      if (hints[ENABLE_DEPTH_SORT]) {
        sortTriangles();
      }
      renderTriangles();
    }
    if (lineCount > 0) {
      if (hints[ENABLE_DEPTH_SORT]) {
        sortLines();
      }
      renderLines();
    }
    // Clear this out in case flush() is called again.
    // For instance, with hint(ENABLE_DEPTH_SORT), it will be called
    // once on endRaw(), and once again at endDraw().
    triangleCount = 0;
    lineCount = 0;
    */
  }