Skip to content

Commit

Permalink
Implemented fix from urholaukkarinen#85 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArcaEge committed Dec 28, 2024
1 parent 0f6beb3 commit 39495ca
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/transform-gizmo-bevy/src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ impl<P: PhaseItem> RenderCommand<P> for DrawTransformGizmo {
return RenderCommandResult::Failure("No GizmoDrawDataHandle inner found");
};

if gizmo.index_buffer.size() == 0 {
return RenderCommandResult::Failure("gizmo.index_buffer is empty");
}

pass.set_index_buffer(gizmo.index_buffer.slice(..), 0, IndexFormat::Uint32);
pass.set_vertex_buffer(0, gizmo.position_buffer.slice(..));
pass.set_vertex_buffer(1, gizmo.color_buffer.slice(..));
Expand Down

0 comments on commit 39495ca

Please sign in to comment.