selfdrive/ui/paint.cc
static void ui_draw_world(UIState *s) {
  const UIScene *scene = &s->scene;
  // Don't draw on top of sidebar
  nvgScissor(s->vg, s->viz_rect.x, s->viz_rect.y, s->viz_rect.w, s->viz_rect.h);

  // Draw lane edges and vision/mpc tracks
  ui_draw_vision_lane_lines(s);

  // Draw lead indicators if openpilot is handling longitudinal
  //if (s->scene.longitudinal_control) {
    if (scene->lead_data[0].getStatus()) {
      draw_lead(s, 0);
    }
    if (scene->lead_data[1].getStatus() && (std::abs(scene->lead_data[0].getDRel() - scene->lead_data[1].getDRel()) > 3.0)) {
      draw_lead(s, 1);
    }
  //}
  nvgResetScissor(s->vg);
}
// Draw all world space objects.
Draw all world space objects.
Draw all world space objects .
static void ui_draw_world(UIState *s) {
  const UIScene *scene = &s->scene;
  nvgScissor(s->vg, s->viz_rect.x, s->viz_rect.y, s->viz_rect.w, s->viz_rect.h);
  ui_draw_vision_lane_lines(s);
    if (scene->lead_data[0].getStatus()) {
      draw_lead(s, 0);
    }
    if (scene->lead_data[1].getStatus() && (std::abs(scene->lead_data[0].getDRel() - scene->lead_data[1].getDRel()) > 3.0)) {
      draw_lead(s, 1);
    }
  nvgResetScissor(s->vg);
}
static void ui_draw_world ( UIState * s ) { const UIScene * scene = & s -> scene ; nvgScissor ( s -> vg , s -> viz_rect . x , s -> viz_rect . y , s -> viz_rect . w , s -> viz_rect . h ) ; ui_draw_vision_lane_lines ( s ) ; if ( scene -> lead_data [ 0 ] . getStatus ( ) ) { draw_lead ( s , 0 ) ; } if ( scene -> lead_data [ 1 ] . getStatus ( ) && ( std :: abs ( scene -> lead_data [ 0 ] . getDRel ( ) - scene -> lead_data [ 1 ] . getDRel ( ) ) > 3.0 ) ) { draw_lead ( s , 1 ) ; } nvgResetScissor ( s -> vg ) ; }
Draw all world space objects.
Draw all world space objects .
// Don't draw on top of sidebar // Draw lane edges and vision/mpc tracks // Draw lead indicators if openpilot is handling longitudinal //if (s->scene.longitudinal_control) { //}