From e1bb0b57f7445c1d2d73cecefc4ae15daa403d90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Garramu=C3=B1o?= Date: Sun, 10 Sep 2023 07:30:28 -0300 Subject: [PATCH] Fixed OpenGL error on Saving image or sequences. --- mrv2/lib/mrvFl/mrvSaving.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mrv2/lib/mrvFl/mrvSaving.cpp b/mrv2/lib/mrvFl/mrvSaving.cpp index ef20e039f..2d20eeb9a 100644 --- a/mrv2/lib/mrvFl/mrvSaving.cpp +++ b/mrv2/lib/mrvFl/mrvSaving.cpp @@ -15,6 +15,7 @@ namespace fs = std::filesystem; #include #include +#include #include #include @@ -224,6 +225,10 @@ namespace mrv view->setHudActive(false); math::Size2i offscreenBufferSize(renderSize.w, renderSize.h); + + view->make_current(); + gl::initGLAD(); + auto buffer = gl::OffscreenBuffer::create( offscreenBufferSize, offscreenBufferOptions); @@ -249,6 +254,9 @@ namespace mrv const auto& videoData = timeline->getVideo(currentTime).get(); + view->make_current(); + gl::initGLAD(); + // Render the video. gl::OffscreenBufferBinding binding(buffer); CHECK_GL; @@ -519,6 +527,8 @@ namespace mrv view->setHudActive(false); math::Size2i offscreenBufferSize(renderSize.w, renderSize.h); + view->make_current(); + gl::initGLAD(); auto buffer = gl::OffscreenBuffer::create( offscreenBufferSize, offscreenBufferOptions); CHECK_GL;