Skip to content

Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.

Benchmark: a running benchmark always wants frames (not the last frame's 0.5 s keep-alive)

islandmed11a98a9a17a7
diff --git a/src/app/App.cpp b/src/app/App.cpp
index 53cadbc4..cbb7f079 100644
--- a/src/app/App.cpp
+++ b/src/app/App.cpp
@@ -733,6 +733,7 @@ bool App::focusKeepsDrawing(double now) const {
bool App::wantsFrames(double now) const {
return now < activeUntil_ || focusKeepsDrawing(now) || drag_ != Drag::None || ui::HoverAnimating() || // a hover ring easing in or out
doc_.sculptor.strokeActive() ||
+ proofRunning() || // (not a keep-alive from the last frame: building a scene takes longer than any timeout)
!dabQueue_.empty() || // a stroke's dabs still waiting (drainStrokeDabs) are placed a few each frame
strokeFinishing_ || solverBusy() || // the solver thread is placing a stroke's dabs (AsyncStroke.cpp)
backgroundBusy() || playingLayer_ >= 0 || faceTakePlaying_ ||
diff --git a/src/app/App.h b/src/app/App.h
index 580d307d..f63d9d86 100644
--- a/src/app/App.h
+++ b/src/app/App.h
@@ -2318,6 +2318,7 @@ private:
int runTimelapseCli(); // sculptforge FILE --timelapse out.mp4
void startProofMode(); // Help > Benchmark, sculptforge --benchmark
bool proofSkippedScenes() const; // the benchmark skipped a scene: too little free memory
+ bool proofRunning() const; // a benchmark is measuring (not its intro or results): every frame is wanted
void proofBeforeSwap(int fbW, int fbH); // the interactive loop, after drawing a frame, before showing it
void drawProofUi();
// ---- end Sculpt Timeline ----
diff --git a/src/app/ProofMode.cpp b/src/app/ProofMode.cpp
index 4b9a8ee2..88b8f775 100644
--- a/src/app/ProofMode.cpp
+++ b/src/app/ProofMode.cpp
@@ -696,12 +696,15 @@ void App::drawProofUi() {
}
}
+bool App::proofRunning() const {
+ return proof_ && proof_->stage != ProofState::Stage::Intro && proof_->stage != ProofState::Stage::Results;
+}
+
void App::proofBeforeSwap(int fbW, int fbH) {
ProofState& p = *proof_;
using Stage = ProofState::Stage;
if (p.stage == Stage::Intro || p.stage == Stage::Results) return;
const double now = nowSeconds();
- activeUntil_ = std::max(activeUntil_, double(SDL_GetTicksNS()) * 1e-9 + 0.5); // keep the loop drawing
// Esc stops the run (the real pointer is kept out of the scripted stroke, the keyboard is not).
if (const bool* keys = SDL_GetKeyboardState(nullptr); keys && keys[SDL_SCANCODE_ESCAPE] && p.stage != Stage::Finish) {
p.error = "Stopped with Esc: the results are partial";