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.

Merge feat/benchmark-script 01131a5f: --benchmark-script real-time takes (HUD, video, per-frame CSV); bench_take_sphere

islandmed3b96dc444e23
diff --cc src/app/App.cpp
index 1673d449,ffd9e13e..1c5a2776
--- a/src/app/App.cpp
+++ b/src/app/App.cpp
@@@ -1229,12 -1228,8 +1232,13 @@@ int App::run()
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
hardwareProfileFrameEnd();
if (proof_) proofBeforeSwap(fbW, fbH); // Help > Benchmark: timing, video capture, the scripted pointer
+ if (take_) takeBeforeSwap(fbW, fbH); // --benchmark-script: the same for a take
+ // CPU and GPU overlap: the GPU draws this frame while the CPU builds the next. At most one frame in flight
+ // (the input lag doesn't grow): the last frame's GPU work is done before this one is shown.
+ waitLastFrame();
SDL_GL_SwapWindow(window_);
+ lastFrameFence_ = gl::FenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
+ gl::Flush(); // (to the GPU now: an offscreen swap sends nothing)
mark();
if (phases == 7) // (Help > Benchmark splits each phase's frames by these)
for (int k = 0; k < 6; ++k) frameSplitMs_[k] = phase[k + 1] - phase[k];