diff --git a/main.cpp b/main.cpp index dcf8a85..bb5698f 100644 --- a/main.cpp +++ b/main.cpp @@ -168,6 +168,7 @@ int main(int argc, char* argv[]) std::atexit(TerminateDSP); bool exit = false; + bool update = true; while(!exit && !glfwWindowShouldClose(window)) { glfwPollEvents(); glClearColor(0.0f, 0.0f, 0.0f, 1.0f); @@ -177,7 +178,7 @@ int main(int argc, char* argv[]) #if defined(GL_UNPACK_ROW_LENGTH) && !defined(__EMSCRIPTEN__) glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); #endif - { + if(update) { std::lock_guard guard(waterfall_data_mutex); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, waterfall_width, waterfall_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, waterfall_data); } @@ -195,6 +196,7 @@ int main(int argc, char* argv[]) ImGui::TableSetupColumn("", 0, 280.0); ImGui::TableSetupColumn("", 0, 1000.0); ImGui::TableNextColumn(); + ImGui::Checkbox("Update", &update); if(ImGui::Button("Exit")) exit = true; ImGui::Text("FPS: %d", (int)fps);