|
@@ -319,8 +319,7 @@ Window::Window() { |
|
|
int nvgFlags = NVG_ANTIALIAS; |
|
|
int nvgFlags = NVG_ANTIALIAS; |
|
|
#if defined NANOVG_GL2 |
|
|
#if defined NANOVG_GL2 |
|
|
vg = nvgCreateGL2(nvgFlags); |
|
|
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 |
|
|
#elif defined NANOVG_GL3 |
|
|
vg = nvgCreateGL3(nvgFlags); |
|
|
vg = nvgCreateGL3(nvgFlags); |
|
|
#elif defined NANOVG_GLES2 |
|
|
#elif defined NANOVG_GLES2 |
|
@@ -331,8 +330,6 @@ Window::Window() { |
|
|
exit(1); |
|
|
exit(1); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// fbVg = nvgClone(vg); |
|
|
|
|
|
|
|
|
|
|
|
// Load default Blendish font |
|
|
// Load default Blendish font |
|
|
uiFont = loadFont(asset::system("res/fonts/DejaVuSans.ttf")); |
|
|
uiFont = loadFont(asset::system("res/fonts/DejaVuSans.ttf")); |
|
|
bndSetFont(uiFont->handle); |
|
|
bndSetFont(uiFont->handle); |
|
|