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/shader-toy/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/shader-toy/main.cpp') diff --git a/examples/shader-toy/main.cpp b/examples/shader-toy/main.cpp index 549dbef73..350853b6f 100644 --- a/examples/shader-toy/main.cpp +++ b/examples/shader-toy/main.cpp @@ -283,7 +283,7 @@ struct ShaderToyApp : public WindowedAppBase Result initialize() { - SLANG_RETURN_ON_FAIL(initializeBase("Shader Toy", 1024, 768)); + SLANG_RETURN_ON_FAIL(initializeBase("Shader Toy", 1024, 768, getDeviceType())); // We may not have a window if we're running in test mode SLANG_ASSERT(isTestMode() || gWindow); -- cgit v1.2.3