Skip to content

Commit

Permalink
wip profiling in salva
Browse files Browse the repository at this point in the history
  • Loading branch information
Vrixyz committed Nov 22, 2024
1 parent 9b09a1c commit 3df73db
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
15 changes: 5 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,12 @@ salva3d = { path = "./build/salva3d" }
#rapier_testbed2d = { git = "https://github.com/dimforge/rapier", branch = "split_geom" }
#rapier_testbed3d = { git = "https://github.com/dimforge/rapier", branch = "split_geom" }

rapier2d = { git = "https://github.com/dimforge/rapier" }
rapier3d = { git = "https://github.com/dimforge/rapier" }
rapier_testbed2d = { git = "https://github.com/dimforge/rapier" }
# rapier2d = { git = "https://github.com/dimforge/rapier" }
# rapier3d = { git = "https://github.com/dimforge/rapier" }
# rapier_testbed2d = { git = "https://github.com/dimforge/rapier" }
rapier_testbed3d = { git = "https://github.com/dimforge/rapier" }

# rapier2d = { git = "https://github.com/dimforge/rapier", rev = "3b0d256" }
# rapier3d = { git = "https://github.com/dimforge/rapier", rev = "3b0d256" }
# rapier_testbed2d = { git = "https://github.com/dimforge/rapier", rev = "3b0d256" }
# rapier_testbed3d = { git = "https://github.com/dimforge/rapier", rev = "3b0d256" }

# rapier2d = { path = "../rapier/crates/rapier2d" }
rapier2d = { path = "../rapier/crates/rapier2d" }
# rapier3d = { path = "../rapier/crates/rapier3d" }
# rapier_testbed2d = { path = "../rapier/crates/rapier_testbed2d" }
rapier_testbed2d = { path = "../rapier/crates/rapier_testbed2d" }
# rapier_testbed3d = { path = "../rapier/crates/rapier_testbed3d" }
14 changes: 13 additions & 1 deletion src/integrations/rapier/testbed_plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use crate::math::{Isometry, Point, Real, Rotation, Translation, Vector};
use crate::object::{BoundaryHandle, FluidHandle};
use bevy::math::Quat;
use bevy::prelude::{Assets, Commands, Mesh, Query, Transform};
use bevy_egui::egui;
use bevy_egui::{egui::ComboBox, egui::Window, EguiContexts};
#[cfg(feature = "dim3")]
use na::Quaternion;
Expand Down Expand Up @@ -487,7 +488,18 @@ impl TestbedPlugin for FluidsTestbedPlugin {
|| changed;
}
});

let counters = self.fluids_pipeline.liquid_world.counters;
let _ = egui::CollapsingHeader::new(format!(
"Total: {:.2}ms - {} fps",
counters.step_time.time(),
(1000.0 / counters.step_time.time()).round()
))
.id_source("total_fluids")
.show(ui, |ui| {
let _ = ui.label(format!("{}", counters));
// // Ideally:
// p.profiling_ui(ui);
});
if changed {
// FIXME: not too sure what to do here for color
// let fluid_handle = self
Expand Down

0 comments on commit 3df73db

Please sign in to comment.