mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
Skip is in view for now
This commit is contained in:
parent
f1be6ec9be
commit
a447084674
@ -390,11 +390,7 @@ impl ViewRegion {
|
||||
&& world_coords.y <= self.max_tile.y + self.padding
|
||||
&& world_coords.x >= self.min_tile.x - self.padding
|
||||
&& world_coords.y >= self.min_tile.y - self.padding
|
||||
&& (world_coords.z == self.z
|
||||
|| world_coords.z.checked_sub(1).unwrap_or(0) == self.z
|
||||
|| world_coords.z.checked_sub(2).unwrap_or(0) == self.z
|
||||
|| world_coords.z.checked_sub(3).unwrap_or(0) == self.z
|
||||
|| world_coords.z + 1 == self.z)
|
||||
&& world_coords.z == self.z
|
||||
}
|
||||
|
||||
pub fn iter(&self) -> impl Iterator<Item = WorldTileCoords> + '_ {
|
||||
|
||||
@ -401,9 +401,9 @@ impl RenderState {
|
||||
let world_coords = entry.coords;
|
||||
|
||||
// FIXME: Does not take into account rendering tiles with different z
|
||||
if !view_region.is_in_view(&entry.coords) {
|
||||
/*if !view_region.is_in_view(&entry.coords) {
|
||||
continue;
|
||||
}
|
||||
}*/
|
||||
|
||||
let zoom_factor = 2.0_f64.powf(world_coords.z as f64 - self.zoom) as f32;
|
||||
|
||||
@ -595,7 +595,7 @@ impl RenderState {
|
||||
);
|
||||
}
|
||||
|
||||
#[tracing::instrument]
|
||||
#[tracing::instrument(skip_all)]
|
||||
pub fn render(&mut self) -> Result<(), wgpu::SurfaceError> {
|
||||
let frame = self.surface.get_current_texture()?;
|
||||
let frame_view = frame
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user