We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36b1646 commit d52344eCopy full SHA for d52344e
crates/bevy_render/src/render_phase/mod.rs
@@ -105,9 +105,10 @@ impl<I: PhaseItem> RenderPhase<I> {
105
let mut draw_functions = draw_functions.write();
106
draw_functions.prepare(world);
107
108
- let mut index = range.start;
109
- while index < range.end {
110
- let item = &self.items[index];
+ let items = self.items.get(range).expect("`Range` provided to `render_range()` is out of bounds");
+ let mut index = 0;
+ while index < items.len() {
111
+ let item = &items[index];
112
let draw_function = draw_functions.get_mut(item.draw_function()).unwrap();
113
draw_function.draw(world, render_pass, view, item);
114
index += item.batch_size();
0 commit comments