From 3b54182b02d5b0a42907f59f4645b0de41724b33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag=20=C3=85gren?= Date: Sun, 3 Sep 2017 01:22:50 +0300 Subject: [PATCH 1/3] Remove unused variable. --- src/nanovg.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/nanovg.c b/src/nanovg.c index d018034..61fcd14 100644 --- a/src/nanovg.c +++ b/src/nanovg.c @@ -390,7 +390,6 @@ void nvgCancelFrame(NVGcontext* ctx) void nvgEndFrame(NVGcontext* ctx) { - NVGstate* state = nvg__getState(ctx); ctx->params.renderFlush(ctx->params.userPtr); if (ctx->fontImageIdx != 0) { int fontImage = ctx->fontImages[ctx->fontImageIdx]; From b124bbbaf5e2b96c33cbcef12de558c1f22de5b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag=20=C3=85gren?= Date: Sun, 3 Sep 2017 01:32:00 +0300 Subject: [PATCH 2/3] Fix implicit conversion warning. --- src/fontstash.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fontstash.h b/src/fontstash.h index 78abb95..560b10b 100644 --- a/src/fontstash.h +++ b/src/fontstash.h @@ -873,7 +873,8 @@ error: int fonsAddFont(FONScontext* stash, const char* name, const char* path) { FILE* fp = 0; - int dataSize = 0, readed; + int dataSize = 0; + size_t readed; unsigned char* data = NULL; // Read in the font data. From ac6a6568983a1e925b81ff2b1d14de197937bc01 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Tue, 5 Sep 2017 14:42:27 +0100 Subject: [PATCH 3/3] Fix MSVC 2017 compiler warning --- src/nanovg_gl.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/nanovg_gl.h b/src/nanovg_gl.h index a8b788d..a6d5fac 100644 --- a/src/nanovg_gl.h +++ b/src/nanovg_gl.h @@ -945,10 +945,17 @@ static int glnvg__convertPaint(GLNVGcontext* gl, GLNVGfragUniforms* frag, NVGpai } frag->type = NSVG_SHADER_FILLIMG; + #if NANOVG_GL_USE_UNIFORMBUFFER if (tex->type == NVG_TEXTURE_RGBA) frag->texType = (tex->flags & NVG_IMAGE_PREMULTIPLIED) ? 0 : 1; else frag->texType = 2; + #else + if (tex->type == NVG_TEXTURE_RGBA) + frag->texType = (tex->flags & NVG_IMAGE_PREMULTIPLIED) ? 0.0f : 1.0f; + else + frag->texType = 2.0f; + #endif // printf("frag->texType = %d\n", frag->texType); } else { frag->type = NSVG_SHADER_FILLGRAD;