This commit is contained in:
2021-10-22 07:37:38 +02:00
parent c63f7fc556
commit 0ccc56bbad
7 changed files with 18 additions and 13 deletions

View File

@@ -335,7 +335,8 @@ impl VulkanRenderer {
// Draw meshes etc.
let mut index = 0;
for pipeline in &self.pipelines {
pipeline.draw(&mut builder, fb_index, game_objects.iter().filter(|go| go.pipeline_index == index).collect(), &self.game_data, &self.dynamic_state);
let objects = game_objects.iter().filter(|go| go.visible && go.pipeline_index == index).collect();
pipeline.draw(&mut builder, fb_index, objects, &self.game_data, &self.dynamic_state);
index += 1;
}