diff --git a/src/common/nanovgcontext.cpp b/src/common/nanovgcontext.cpp index 196865076..5d20b7038 100644 --- a/src/common/nanovgcontext.cpp +++ b/src/common/nanovgcontext.cpp @@ -16,9 +16,8 @@ NanoVGContext::NanoVGContext(Viz2D &v2d, NVGcontext *context, CLGLContext &fbCon void NanoVGContext::render(std::function fn) { CLExecScope_t scope(clglContext_.getCLExecContext()); - begin(); + NanoVGContext::Scope nvgScope(*this); fn(context_, clglContext_.getSize()); - end(); } void NanoVGContext::begin() {