Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds command-line help and version flags to the vsdf tool, and improves the documentation by adding git submodule initialization instructions to all build sections.
Changes:
- Added
--helpand--versioncommand-line flags to src/main.cpp - Added
git submodule update --init --recursivecommands to all build and test sections in README.md - Added a new "Populate submodules" section as step 0 in QUICKSTART.md
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/main.cpp | Adds --help and --version flags with supporting functions, and includes spdlog/fmt/fmt.h for formatted output |
| README.md | Adds git submodule initialization command before all cmake build commands (4 locations: Linux/macOS build, Windows build, Linux/macOS test build, Windows test build) |
| QUICKSTART.md | Adds a dedicated "0) Populate submodules" section with the git submodule command at the beginning of the quickstart guide |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| fmt::print("Usage: {} [options] <shader.frag>\nExample: {} --toy " | ||
| "shaders/testtoyshader.frag\n", | ||
| exe, exe); |
There was a problem hiding this comment.
The printHelp function only shows a basic usage example with the --toy option, but doesn't document other available flags like --headless, --frames, --log-level, --debug-dump-ppm, or the FFmpeg-related options that are listed in the README. Consider expanding the help text to include all available command-line options, or at least the most commonly used ones, to make the tool more discoverable for users.
| fmt::print("Usage: {} [options] <shader.frag>\nExample: {} --toy " | |
| "shaders/testtoyshader.frag\n", | |
| exe, exe); | |
| fmt::print( | |
| "Usage: {} [options] <shader.frag>\n" | |
| "\n" | |
| "Options:\n" | |
| " --toy Use Shadertoy-style template for the fragment shader\n" | |
| " --headless Run without creating a window (offscreen rendering)\n" | |
| " --frames <N> Limit the number of frames to render before exiting\n" | |
| " --log-level <LEVEL> Set log verbosity (trace, debug, info, warn, error, critical, off)\n" | |
| " --debug-dump-ppm <DIR> Dump rendered frames as PPM files into directory DIR\n" | |
| #if defined(VSDF_ENABLE_FFMPEG) | |
| " [FFmpeg] Additional FFmpeg encoding options are available; see README\n" | |
| #endif | |
| "\n" | |
| "Example:\n" | |
| " {} --toy shaders/testtoyshader.frag\n", | |
| exe, exe); |
README.mdfix forgitsubmodule sync--version--help