From b13e435709e4388361e3387ba7bd659d1b42c3cd Mon Sep 17 00:00:00 2001 From: kallaballa Date: Mon, 6 Mar 2023 17:45:05 +0100 Subject: [PATCH] introduced makeUncurrent() in Viz2D --- src/common/viz2d.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/common/viz2d.cpp b/src/common/viz2d.cpp index 295597fce..be3170d08 100644 --- a/src/common/viz2d.cpp +++ b/src/common/viz2d.cpp @@ -405,6 +405,11 @@ void Viz2D::write(std::function fn) { void Viz2D::makeCurrent() { glfwMakeContextCurrent(getGLFWWindow()); } + +void Viz2D::makeUncurrent() { + glfwMakeContextCurrent(nullptr); +} + #ifndef __EMSCRIPTEN__ cv::VideoWriter& Viz2D::makeVAWriter(const string &outputFilename, const int fourcc, const float fps, const cv::Size &frameSize, const int vaDeviceIndex) { writerPath_ = outputFilename;