diff --git a/dep/nanovg b/dep/nanovg index ade6e6c0..ccaaf90c 160000 --- a/dep/nanovg +++ b/dep/nanovg @@ -1 +1 @@ -Subproject commit ade6e6c060504002a4409fb0943432cf5c494872 +Subproject commit ccaaf90c80bb639823ff4cdcbbb413ee97751ebe diff --git a/src/Window.cpp b/src/Window.cpp index 639d7d98..506bcf0d 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -319,8 +319,7 @@ Window::Window() { int nvgFlags = NVG_ANTIALIAS; #if defined NANOVG_GL2 vg = nvgCreateGL2(nvgFlags); - // TODO Instead of creating a whole other NanoVG context, create one that uses the same fonts and framebuffers as `fb`. - fbVg = nvgCreateGL2(nvgFlags); + fbVg = nvgCreateSharedGL2(vg, nvgFlags); #elif defined NANOVG_GL3 vg = nvgCreateGL3(nvgFlags); #elif defined NANOVG_GLES2 @@ -331,8 +330,6 @@ Window::Window() { exit(1); } - // fbVg = nvgClone(vg); - // Load default Blendish font uiFont = loadFont(asset::system("res/fonts/DejaVuSans.ttf")); bndSetFont(uiFont->handle);