protected void render() {
    if (pointCount > 0) {
      renderPoints(0, pointCount);
      if (raw != null) {
        rawPoints(0, pointCount);
      }
      pointCount = 0;
    }
    if (lineCount > 0) {
      renderLines(0, lineCount);
      if (raw != null) {
        rawLines(0, lineCount);
      }
      lineCount = 0;
      pathCount = 0;
    }
    if (triangleCount > 0) {
      renderTriangles(0, triangleCount);
      if (raw != null) {
        rawTriangles(0, triangleCount);
      }
      triangleCount = 0;
    }
  }