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. 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]; 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;