From a1ef55a0fe482e3142da6b47bcf7c320787d7e5f Mon Sep 17 00:00:00 2001 From: Maximilian Ammann Date: Fri, 31 Dec 2021 17:44:03 +0100 Subject: [PATCH] Adjust example --- src/main_loop.rs | 6 +++--- src/render/state.rs | 2 +- src/tesselation/tile.rs | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main_loop.rs b/src/main_loop.rs index f96b3863..b40c7b09 100644 --- a/src/main_loop.rs +++ b/src/main_loop.rs @@ -10,9 +10,9 @@ use crate::render::state::State; pub async fn setup(window: winit::window::Window, event_loop: EventLoop<()>, cache: Cache) { info!("== mapr =="); - for x in 0..2 { - for y in 0..2 { - cache.fetch((2179 + x, 1421 + y, 12).into()) + for x in 0..6 { + for y in 0..6 { + cache.fetch((2178 + x, 1421 + y, 12).into()) } } diff --git a/src/render/state.rs b/src/render/state.rs index 88298735..0115e7fe 100644 --- a/src/render/state.rs +++ b/src/render/state.rs @@ -386,7 +386,7 @@ impl State { } pub fn upload_tile_geometry(&mut self, cache: &Cache) { - const OFFSET_X: u32 = 2179; + const OFFSET_X: u32 = 2178; const OFFSET_Y: u32 = 1421; let upload = cache.pop_all(); diff --git a/src/tesselation/tile.rs b/src/tesselation/tile.rs index 2a45230d..afe66893 100644 --- a/src/tesselation/tile.rs +++ b/src/tesselation/tile.rs @@ -1,3 +1,4 @@ +use lyon::lyon_tessellation::LineJoin; use lyon::tessellation; use lyon::tessellation::geometry_builder::MaxIndex; use lyon::tessellation::{ @@ -97,7 +98,7 @@ impl< tesselator .tessellate_path( &tile_path, - &StrokeOptions::tolerance(DEFAULT_TOLERANCE), + &StrokeOptions::default(), &mut BuffersBuilder::new(buffer, WithId(prim_id)), ) .unwrap(); @@ -119,7 +120,7 @@ impl< tesselator .tessellate_path( &tile_path, - &FillOptions::tolerance(DEFAULT_TOLERANCE), + &FillOptions::default(), &mut BuffersBuilder::new(buffer, WithId(prim_id)), ) .unwrap();