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;