| 90 | static FPSLimiter g_FPSLimiter; |
| 91 | |
| 92 | Sample::Sample(donut::app::DeviceManager& deviceManager, |
| 93 | const CommandLineOptions& cmdLine) |
| 94 | : app::ApplicationBase(&deviceManager ) |
| 95 | , m_cmdLine(cmdLine) |
| 96 | , m_ui(g_sampleUIData) |
| 97 | { |
| 98 | m_progressLoading.Start("Initializing..."); |
| 99 | m_progressLoading.Set(50); |
| 100 | |
| 101 | m_camera.SetRotateSpeed(.003f); |
| 102 | |
| 103 | #if DONUT_WITH_STREAMLINE |
| 104 | m_ui.IsDLSSSuported = GetDeviceManager()->GetStreamline().IsDLSSAvailable(); |
| 105 | m_ui.IsDLSSFGSupported = GetDeviceManager()->GetStreamline().IsDLSSGAvailable(); |
| 106 | m_ui.IsReflexSupported = GetDeviceManager()->GetStreamline().IsReflexAvailable(); |
| 107 | m_ui.IsDLSSRRSupported = GetDeviceManager()->GetStreamline().IsDLSSRRAvailable(); |
| 108 | #endif |
| 109 | |
| 110 | // Enumerate all environment maps in the media folder |
| 111 | m_envMapMediaList.clear(); |
| 112 | m_envMapMediaFolder = GetLocalPath(c_AssetsFolder) / c_EnvMapSubFolder; |
| 113 | for (const auto& file : std::filesystem::directory_iterator(m_envMapMediaFolder)) |
| 114 | { |
| 115 | if (!file.is_regular_file()) continue; |
| 116 | if (file.path().extension() == ".exr" || file.path().extension() == ".hdr" || file.path().extension() == ".dds") |
| 117 | m_envMapMediaList.push_back(file.path()); |
| 118 | } |
| 119 | |
| 120 | m_captureScriptManager = std::make_unique<CaptureScriptManager>(*this, m_ui, m_cmdLine); |
| 121 | } |
| 122 | |
| 123 | Sample::~Sample() |
| 124 | { |
nothing calls this directly
no test coverage detected