diff options
| author | Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 2025-07-21 19:15:07 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-21 19:15:07 -0700 |
| commit | 13dd01489efd89268d15751c5299e5783015bbcd (patch) | |
| tree | 13208541f8838a16e69d38645f7eebfc76326394 /examples/model-viewer/main.cpp | |
| parent | a77d22bf3bfc3098b01e4886c3a63fb751edc704 (diff) | |
Add command-line arguments to examples (#7835)
* Add command-line arguments to triangle example
- Add -h/--help flag to show usage information
- Add -api flag to select rendering API (d3d11 < /dev/null | d3d12|vulkan|metal|cpu|cuda|webgpu)
- Platform-specific API availability (D3D on Windows, Metal on macOS)
- Output works for both console and WIN32 applications
Diffstat (limited to 'examples/model-viewer/main.cpp')
| -rw-r--r-- | examples/model-viewer/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/model-viewer/main.cpp b/examples/model-viewer/main.cpp index 9c1c763f2..a70d52320 100644 --- a/examples/model-viewer/main.cpp +++ b/examples/model-viewer/main.cpp @@ -748,7 +748,7 @@ struct ModelViewer : WindowedAppBase // Result initialize() { - SLANG_RETURN_ON_FAIL(initializeBase("Model Viewer", 1024, 768)); + SLANG_RETURN_ON_FAIL(initializeBase("Model Viewer", 1024, 768, getDeviceType())); if (!isTestMode()) { gWindow->events.mouseMove = [this](const platform::MouseEventArgs& e) |
