Skip to content

Commit

Permalink
Fix Extracted* not being cleared
Browse files Browse the repository at this point in the history
  • Loading branch information
rparrett committed Dec 4, 2024
1 parent fe2c8ac commit e131640
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/render/extract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use bevy::math::Affine3A;
use bevy::render::primitives::{Aabb, Frustum};
use bevy::render::render_resource::FilterMode;
use bevy::render::render_resource::TextureFormat;
use bevy::render::sync_world::RenderEntity;
use bevy::render::sync_world::{RenderEntity, TemporaryRenderEntity};
use bevy::{prelude::*, render::Extract, utils::HashMap};

use crate::prelude::TilemapGridSize;
Expand Down Expand Up @@ -33,6 +33,7 @@ pub struct ExtractedTile {
#[derive(Bundle)]
pub struct ExtractedTileBundle {
tile: ExtractedTile,
temporary: TemporaryRenderEntity,
}

#[derive(Bundle)]
Expand All @@ -48,6 +49,7 @@ pub struct ExtractedTilemapBundle {
visibility: InheritedVisibility,
frustum_culling: FrustumCulling,
render_settings: TilemapRenderSettings,
temporary: TemporaryRenderEntity,
}

#[derive(Component)]
Expand All @@ -60,6 +62,7 @@ pub(crate) struct ExtractedTilemapTexture {
pub texture: TilemapTexture,
pub filtering: FilterMode,
pub format: TextureFormat,
pub temporary: TemporaryRenderEntity,
}

impl ExtractedTilemapTexture {
Expand Down Expand Up @@ -140,6 +143,7 @@ impl ExtractedTilemapTexture {
tile_count,
texture_size,
format,
temporary: TemporaryRenderEntity,
}
}
}
Expand Down Expand Up @@ -283,6 +287,7 @@ pub fn extract(
visibility: *data.8,
frustum_culling: *data.9,
render_settings: *data.10,
temporary: TemporaryRenderEntity,
},
),
);
Expand All @@ -297,6 +302,7 @@ pub fn extract(
tile,
tilemap_id: TilemapId(data.0.id()),
},
temporary: TemporaryRenderEntity,
},
));
}
Expand All @@ -319,6 +325,7 @@ pub fn extract(
visibility: *data.8,
frustum_culling: *data.9,
render_settings: *data.10,
temporary: TemporaryRenderEntity,
},
),
);
Expand Down

0 comments on commit e131640

Please sign in to comment.