Skip to content

Commit

Permalink
Fix material bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
tychedelia committed Jun 16, 2024
1 parent cea52dc commit 78c1ca6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bevy_nannou_draw/src/draw/drawing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ where
let material: ExtendedNannouMaterial<"", FS> = Default::default();
let mut state = state.write().unwrap();
state.materials.insert(new_id.clone(), Box::new(material));
// Mark the last material as the new material so that further drawings use the same material
// as the parent draw ref.
state.last_material = Some(new_id.clone());

let draw = Draw {
state: draw.state.clone(),
Expand Down

0 comments on commit 78c1ca6

Please sign in to comment.