summaryrefslogtreecommitdiffstats
path: root/examples/triangle/main.cpp
diff options
context:
space:
mode:
authorJay Kwak <82421531+jkwak-work@users.noreply.github.com>2025-07-21 19:15:07 -0700
committerGitHub <noreply@github.com>2025-07-21 19:15:07 -0700
commit13dd01489efd89268d15751c5299e5783015bbcd (patch)
tree13208541f8838a16e69d38645f7eebfc76326394 /examples/triangle/main.cpp
parenta77d22bf3bfc3098b01e4886c3a63fb751edc704 (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/triangle/main.cpp')
-rw-r--r--examples/triangle/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/triangle/main.cpp b/examples/triangle/main.cpp
index 6f61a6c76..2fd51da46 100644
--- a/examples/triangle/main.cpp
+++ b/examples/triangle/main.cpp
@@ -225,7 +225,7 @@ struct HelloWorld : public WindowedAppBase
{
// Create a window for our application to render into.
//
- SLANG_RETURN_ON_FAIL(initializeBase("hello-world", 1024, 768));
+ SLANG_RETURN_ON_FAIL(initializeBase("triangle", 1024, 768, getDeviceType()));
// We will create objects needed to configure the "input assembler"
// (IA) stage of the D3D pipeline.