MCPcopy Create free account
hub / github.com/NVIDIA-RTX/RTXPT / BuildUIPerformancePresets

Method BuildUIPerformancePresets

Rtxpt/SampleUI.cpp:323–347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321}
322
323void SampleUI::BuildUIPerformancePresets()
324{
325 if (!ImGui::BeginPopupModal("Performance Preset", nullptr, ImGuiWindowFlags_AlwaysAutoResize))
326 return;
327
328 ImGui::Text("Click to select a performance preset:");
329 ImGui::Separator();
330
331 for (const auto& preset : s_performancePresets)
332 {
333 bool isCurrent = MatchesPreset(m_ui, preset);
334 std::string displayLabel = std::string(preset.Name) + (isCurrent ? " [current]" : "");
335 if (ImGui::Selectable(displayLabel.c_str(), isCurrent))
336 {
337 ApplyPreset(m_ui, preset);
338 ImGui::CloseCurrentPopup();
339 }
340 }
341
342 ImGui::Separator();
343 if (ImGui::Button("Cancel", { -1, 0 }) || ImGui::IsKeyPressed(ImGuiKey_Escape))
344 ImGui::CloseCurrentPopup();
345
346 ImGui::EndPopup();
347}
348
349void SampleUI::DLSSFGSelectorUI()
350{

Callers

nothing calls this directly

Calls 3

MatchesPresetFunction · 0.85
ApplyPresetFunction · 0.85
ButtonClass · 0.85

Tested by

no test coverage detected