From 13dd01489efd89268d15751c5299e5783015bbcd Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Mon, 21 Jul 2025 19:15:07 -0700 Subject: 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 --- examples/platform-test/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/platform-test/main.cpp') diff --git a/examples/platform-test/main.cpp b/examples/platform-test/main.cpp index 7949d90c1..a2996d2ab 100644 --- a/examples/platform-test/main.cpp +++ b/examples/platform-test/main.cpp @@ -101,7 +101,7 @@ struct PlatformTest : public WindowedAppBase Slang::Result initialize() { - SLANG_RETURN_ON_FAIL(initializeBase("platform-test", 1024, 768)); + SLANG_RETURN_ON_FAIL(initializeBase("platform-test", 1024, 768, getDeviceType())); // We may not have a window if we're running in test mode SLANG_ASSERT(isTestMode() || gWindow); -- cgit v1.2.3