Skip to content

Commit

Permalink
Fix mesh 2d non indexed draw. (#15155)
Browse files Browse the repository at this point in the history
  • Loading branch information
tychedelia authored Sep 12, 2024
1 parent 327e1dd commit 1fd4782
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/bevy_sprite/src/mesh2d/mesh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ impl<P: PhaseItem> RenderCommand<P> for DrawMesh2d {
);
}
RenderMeshBufferInfo::NonIndexed => {
pass.draw(0..gpu_mesh.vertex_count, batch_range.clone());
pass.draw(vertex_buffer_slice.range, batch_range.clone());
}
}
RenderCommandResult::Success
Expand Down
2 changes: 1 addition & 1 deletion examples/shader/shader_instancing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ impl<P: PhaseItem> RenderCommand<P> for DrawMeshInstanced {
);
}
RenderMeshBufferInfo::NonIndexed => {
pass.draw(0..gpu_mesh.vertex_count, 0..instance_buffer.length as u32);
pass.draw(vertex_buffer_slice.range, 0..instance_buffer.length as u32);
}
}
RenderCommandResult::Success
Expand Down

0 comments on commit 1fd4782

Please sign in to comment.