remove unnecessary flags; buildings and areas are always fast to draw now

This commit is contained in:
Dustin Carlino 2019-02-14 17:57:15 -08:00
parent 7fb9f721e1
commit 1fb3739c71
2 changed files with 12 additions and 24 deletions

View File

@ -121,14 +121,12 @@ impl DrawMap {
let mut buildings: Vec<DrawBuilding> = Vec::new();
let mut all_buildings: Vec<(Color, Polygon)> = Vec::new();
if !flags.dont_draw_buildings {
timer.start_iter("make DrawBuildings", map.all_buildings().len());
for b in map.all_buildings() {
timer.next();
let (b, draw) = DrawBuilding::new(b, cs);
buildings.push(b);
all_buildings.extend(draw);
}
timer.start_iter("make DrawBuildings", map.all_buildings().len());
for b in map.all_buildings() {
timer.next();
let (b, draw) = DrawBuilding::new(b, cs);
buildings.push(b);
all_buildings.extend(draw);
}
let draw_all_buildings = prerender.upload(all_buildings);
@ -181,14 +179,12 @@ impl DrawMap {
let mut areas: Vec<DrawArea> = Vec::new();
let mut all_areas: Vec<(Color, Polygon)> = Vec::new();
if !flags.dont_draw_areas {
timer.start_iter("make DrawAreas", map.all_areas().len());
for a in map.all_areas() {
timer.next();
let (draw, color, poly) = DrawArea::new(a, cs);
areas.push(draw);
all_areas.push((color, poly));
}
timer.start_iter("make DrawAreas", map.all_areas().len());
for a in map.all_areas() {
timer.next();
let (draw, color, poly) = DrawArea::new(a, cs);
areas.push(draw);
all_areas.push((color, poly));
}
let draw_all_areas = prerender.upload(all_areas);

View File

@ -28,14 +28,6 @@ pub struct Flags {
pub draw_parcels: bool,
// TODO Ideally these'd be phrased positively, but can't easily make them default to true.
/// Should areas be drawn? Can sometimes be slow.
#[structopt(long = "dont_draw_areas")]
pub dont_draw_areas: bool,
/// Should buildings be drawn? Sometimes there's an awful lot of them.
#[structopt(long = "dont_draw_buildings")]
pub dont_draw_buildings: bool,
/// Should lane markings be drawn? Sometimes they eat too much GPU memory.
#[structopt(long = "dont_draw_lane_markings")]
pub dont_draw_lane_markings: bool,