pub fn extract_meshes_for_gpu_building(
render_mesh_instances: ResMut<'_, RenderMeshInstances>,
render_visibility_ranges: Res<'_, RenderVisibilityRanges>,
render_mesh_instance_queues: ResMut<'_, RenderMeshInstanceGpuQueues>,
changed_meshes_query: Extract<'_, '_, Query<'_, '_, (Entity, &'static ViewVisibility, &'static GlobalTransform, Option<&'static PreviousGlobalTransform>, Option<&'static Lightmap>, Option<&'static Aabb>, &'static Mesh3d, Option<&'static MeshTag>, Has<NoFrustumCulling>, Has<NotShadowReceiver>, Has<TransmittedShadowReceiver>, Has<NotShadowCaster>, Has<NoAutomaticBatching>, Has<VisibilityRange>), Or<(Changed<ViewVisibility>, Changed<GlobalTransform>, Changed<PreviousGlobalTransform>, Changed<Lightmap>, Changed<Aabb>, Changed<Mesh3d>, Changed<NoFrustumCulling>, Changed<NotShadowReceiver>, Changed<TransmittedShadowReceiver>, Changed<NotShadowCaster>, Changed<NoAutomaticBatching>, Changed<VisibilityRange>, Changed<SkinnedMesh>)>>>,
all_meshes_query: Extract<'_, '_, Query<'_, '_, (Entity, &'static ViewVisibility, &'static GlobalTransform, Option<&'static PreviousGlobalTransform>, Option<&'static Lightmap>, Option<&'static Aabb>, &'static Mesh3d, Option<&'static MeshTag>, Has<NoFrustumCulling>, Has<NotShadowReceiver>, Has<TransmittedShadowReceiver>, Has<NotShadowCaster>, Has<NoAutomaticBatching>, Has<VisibilityRange>)>>,
removed_visibilities_query: Extract<'_, '_, RemovedComponents<'_, '_, ViewVisibility>>,
removed_global_transforms_query: Extract<'_, '_, RemovedComponents<'_, '_, GlobalTransform>>,
removed_meshes_query: Extract<'_, '_, RemovedComponents<'_, '_, Mesh3d>>,
gpu_culling_query: Extract<'_, '_, Query<'_, '_, (), (With<Camera>, Without<NoIndirectDrawing>)>>,
meshes_to_reextract_next_frame: ResMut<'_, MeshesToReextractNextFrame>,
)
Expand description
Extracts meshes from the main world into the render world and queues
MeshInputUniform
s to be uploaded to the GPU.
This is optimized to only look at entities that have changed since the last frame.
This is the variant of the system that runs when we’re using GPU
MeshUniform
building.