Skip to content
Snippets Groups Projects
Commit a3d25b31 authored by Thomas Müller's avatar Thomas Müller
Browse files

Add VSync toggle to the GUI

parent ddfc7738
No related branches found
No related tags found
No related merge requests found
......@@ -810,6 +810,8 @@ public:
std::chrono::time_point<std::chrono::steady_clock> m_training_start_time_point;
Eigen::Array4f m_background_color = {0.0f, 0.0f, 0.0f, 1.0f};
bool m_vsync = false;
// Visualization of neuron activations
int m_visualized_dimension = -1;
int m_visualized_layer = 0;
......
......@@ -649,6 +649,9 @@ void Testbed::imgui() {
}
ImGui::Checkbox("Dynamic resolution", &m_dynamic_res);
if (ImGui::Checkbox("VSync", &m_vsync)) {
glfwSwapInterval(m_vsync ? 1 : 0);
}
ImGui::SliderFloat("Target FPS", &m_dynamic_res_target_fps, 2.0f, 144.0f, "%.01f", ImGuiSliderFlags_Logarithmic | ImGuiSliderFlags_NoRoundToFormat);
ImGui::SliderInt("Max spp", &m_max_spp, 0, 1024, "%d", ImGuiSliderFlags_Logarithmic | ImGuiSliderFlags_NoRoundToFormat);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment