private void renderCalloutsLayer() {
    int numOfInfoLines = 0;
    int offset = 0;

    // Print mouse coordinates
    Callout mousePointer = calloutsUpdater.getMousePointerCallout();
    if (mousePointer != null) {
      drawString(
          mousePointer.getText(),
          (int) mousePointer.getPosition().getX(),
          (int) mousePointer.getPosition().getY(),
          (float) 0.0,
          mousePointer.getColor());
    }

    // Print all other callouts
    synchronized (calloutsUpdater.getPrintableCallouts()) {
      for (Callout callout : calloutsUpdater.getPrintableCallouts()) {
        // display multiple info callouts on different lines
        if (callout.getGroup().equalsIgnoreCase("info")) {
          offset = (numOfInfoLines * 50);
          numOfInfoLines++;
          drawString(
              callout.getText(),
              (int) callout.getPosition().getX(),
              (int) callout.getPosition().getY() + offset,
              (float) 0.0,
              callout.getColor());
        } else {
          drawString(
              callout.getText(),
              (int) callout.getPosition().getX(),
              (int) callout.getPosition().getY(),
              (float) 0.0,
              callout.getColor());
        }

        // limit to the last 10 most recent lines
        if (numOfInfoLines > 10) {
          return;
        }
      }
    }
  }