MCPcopy Create free account
hub / github.com/NVIDIA-RTX/Donut / GetGraphicsAPIFromCommandLine

Method GetGraphicsAPIFromCommandLine

src/app/ApplicationBase.cpp:253–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251}
252
253nvrhi::GraphicsAPI donut::app::GetGraphicsAPIFromCommandLine(int argc, const char* const* argv)
254{
255 for (int n = 1; n < argc; n++)
256 {
257 const char* arg = argv[n];
258
259 if (!strcmp(arg, "-d3d11") || !strcmp(arg, "-dx11") || !strcmp(arg, "--d3d11") || !strcmp(arg, "--dx11"))
260 return nvrhi::GraphicsAPI::D3D11;
261 else if (!strcmp(arg, "-d3d12") || !strcmp(arg, "-dx12") || !strcmp(arg, "--d3d12") || !strcmp(arg, "--dx12"))
262 return nvrhi::GraphicsAPI::D3D12;
263 else if(!strcmp(arg, "-vk") || !strcmp(arg, "-vulkan") || !strcmp(arg, "--vk") || !strcmp(arg, "--vulkan"))
264 return nvrhi::GraphicsAPI::VULKAN;
265 }
266
267#if DONUT_WITH_DX12
268 return nvrhi::GraphicsAPI::D3D12;
269#elif DONUT_WITH_VULKAN
270 return nvrhi::GraphicsAPI::VULKAN;
271#elif DONUT_WITH_DX11
272 return nvrhi::GraphicsAPI::D3D11;
273#else
274 #error "No Graphics API defined"
275#endif
276}
277
278std::vector<std::string> donut::app::FindScenes(vfs::IFileSystem& fs, std::filesystem::path const& path)
279{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected