Build polish (#18)

Improve build process and documentation.
Improved ray versus capsule accuracy.
UI improvements
This commit is contained in:
Erin Catto 2026-06-28 10:44:34 -07:00 • committed by GitHub
commit 69037feaba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 1719 additions and 158 deletions

View file

@ -74,6 +74,16 @@ struct SampleContext
bool showMetrics = false;
bool openSamplePicker = false;
// Controls help window (Help > Controls, toggled with ?). Promoted to the
// context so the key handler can reach it. Seeded from newUser after Load.
bool showControls = false;
// Deferred request from the Replay > Open menu. The native file dialog
// blocks on a nested run loop, so it must run outside the frame (top of
// OnFrame) rather than mid-frame inside the ImGui callback, which would
// re-enter the render loop. See OpenReplayFileDialog.
bool openReplayPicker = false;
// Render toggles fed into FrameInput each frame. They live here, not in
// main.cpp, so the Render menu and the frame loop share one source.
bool enableShadows = true;
@ -87,6 +97,10 @@ struct SampleContext
int debugView = 0;
int sampleIndex = 0;
// No settings file found yet. The first run opens the replay viewer with the
// controls window up, so there is something to watch and a key to every action.
bool newUser = true;
};
class Sample
@ -240,6 +254,11 @@ int RegisterReplay( const char* category, const char* name, SampleCreateFcn* fcn
// by leaving the restart flag set while the new sample constructs.
void SelectSample( SampleContext* context, int selection, bool restart );
// Run the native "open replay" file picker and, on success, hand the chosen
// file to the Replay viewer. Must be called outside the frame (the dialog spins
// a blocking nested run loop), driven by SampleContext::openReplayPicker.
void OpenReplayFileDialog( SampleContext* context );
// The single host UI callback: menu bar, sample picker, info panel, and the
// bottom diagnostics drawer.
void DrawUI( SampleContext* context );